Did you mean to put 500M in your call in Setup()? You only put 50M.
The only advice I can give is to look at Teensy-NTP and review its code. It does input capture using the 1588 timer but it must reduce its frequency to 25 MHz
The only application I know of that uses the 1588 timer is Teensy-NTP. In that application, the 1588 clock frequency is 25 MHz, which I think may be the default.
I don't think it could be 1 GHz. You could determine the approximate frequency by...
I'm glad to have a handle on this now. I was thinking my computer was the problem, maybe I should reinstall things, but now things make sense. Thank you for your help.
The TMR is used in PWM mode. The high time is updated on each PWM period, so the signal goes high at the start of the period and then goes low at the end of the high time.
There's a thread where I made some updates to TeensyStep4 that was enough to get some useful examples working. It was not enough to satisfy the desire of users of TeensyStep(3), but it would be worth reading through. Just search for TeensyStep4...
Yes, it takes a while.
Yes, it could.
Yes, it would.
If you use more than the default 64 sectors of Flash for EEPROM, or if you use LitteFS, or if you install a very large program at some point, or you do something custom to write to high...
Frank, that’s exactly what FlasherX does. After your 15 sec erase, install app, and update with FlasherX, whst was the reported buffer size? It should have been close to 8 MB less FLASH_RESERVE less the size of your sketch.
You said you use BBEdit. It has multi-file search capabilities, so you can use it to easily search through all of the Teensy core files on your own machine.
I did a little searching and found there is a popular (1500 stars on github) open-source ring buffer called "lwrb" (lightweight ring buffer) that provides these capabilities. The features list says it is thread-safe and interrupt-safe for...
In the early days of Teensy 3.0 and Teensy 3.1, we regularly heard complaints that Teensy wasn't retaining the loaded program. The actual observed behavior was everything would work fine after uploading new programs, but then Teensy would appear...
The base address is not set. What FlasherX does is start at the TOP (highest address) of flash and work downward. First, it skips over the FLASH_RESERVE. You said you had that set to 64 sectors, and if so, that's enough to get past the EEPROM...
Frank, if you're working on multiple computers, check to make sure that you have the FLASH_RESERVE macro set to 64 sectors (or larger if you are using LittleFS) on all of them.
@jmarsh, when I was working on FlasherX, the bootloader always erased the entire Flash except for EEPROM or LittleFS, if they were in use. FlasherX works well if you start with a full erase, install your sketch via the bootloader, and thereafter...
FlasherX can work in different ways. The demo program receives Hex records via USB or UART serial, parses each one as it arrives, and writes only the binary data to the buffer (in Flash or RAM). I think there is also a demo program where the Hex...
You should use a schmitt trigger. T4 is very fast and needs very sharp edges to count accurately. Since you are using 1000 us in your call to FreqCount::begin(), available() will be true every 1 ms. If your display code takes longer than 1 ms to...
I only learned about this last year, after having helped design quite a few boards that use MCP23017 for 16 digital inputs. We aren't aware of ever having seen a problem, though. Do you have any insight into the conditions under which it might be...
You can get more accurate speed measurements by using library FreqMeasureMulti. It uses T3.5 hardware to measure period between RISING edges (by default), but can also do FALLING edges or both edges. I recommend starting with RISING edges to...
USB isn't anything like serial, where both sides are essentially the same type of hardware. With different connector serial types you basically just have to worry about connecting TX to RX and vice versa. USB doesn't work anything like that...
In fact, I was calling this library from another main codebase that I have. In that code, I have EasyCAT.Init(). Fortunately, I was able to fix the issue today by shortening my ISR and adding another interrupt in setup()...
The sketch below shows how to bypass the code that figures out which pin the interrupt came from, which is one source of delay in your interrupt response. It uses pin 18 to generate PWM and pin 34 to interrupt on rising edges of the PWM. It uses...
Google search says it’s for windows Linux macOS, okay for embedded Linux, challenging for smaller micros. If you plan to use Modbus tcp there are lots of other options.
There was no call to EasyCAT.Init() in the code you posted. beginTransation() simply sets up the SPI with the correct speed and mode for a given device, and endTransaction() is the bookend to "release" the SPI, but there is no processing...
Original Arduino doesn't have built-in Ethernet. The list of supported hardware for the Websocket library contains Arduino-compatible platforms with built-in Ethernet (ESP32) or Wifi (Pico W), but also without (ATMega), in which case a shield is...
This is a guess, but as of Teensyduino 1.60, MTP is part of the Teensy core, so you no longer need the library, and if you have the MTP library installed, you should remove it. I've never used or tried to build the Audio Guestbook, but I wonder...
No, there is no issue with 1-kHz interrupts. That's not a high interrupt rate as your other test shows. At 2M baud, you get ~200,000 bytes/sec, or ~200 bytes/ms, so it would take 5 seconds for your buffer to overflow. When you say the UART stream...
Have you tried just having an ISR that simply returns? If your serial code still works with that ISR, then the issue is not the interrupt itself, but what you do in the interrupt, which seems more likely. I suspect you'll be able to show that the...
I can't confirm your analysis, but I can recommend another resource. The links below are for a Teensy 4.1 NTP server that uses the 1588 hardware. It uses a 1-PPS signal from a GPS module. The first message in the forum thread mentions use of the...
Just to repeat, power the display with 5V power and leave the SDA and SCL pins unconnected. Turn the pot while watching the display. The pot will probably be able to turn about 240 to 270 degrees. Don't apply too much torque, as these tiny...
Whew! God bless you. That was it. This lets me keep the Squareline export completely unmodified. Everything compiled and didn’t crash at runtime with dynamic allocation. Only have 44k left to play with in RAM1.
Try simply renaming your ".c" files to ".cpp" in addition to manually adding PROGMEM or DMAMEM.
C++ is a superset of C, so in most cases C files can simply be named to be C++ file.
Is this where you brag about your projects?
Here's an audio equalizer and general purpose DSP platform I put together. It's made up of an Teensy 4.1 for the DSP, a CYD (Cheap Yellow Display) for the visual part of the UI and a ES9039Q2M board I...
I think that is what BriComp is doing with Visual Micro. There is also the TeensyDebug library on github. I haven't used either, so I can't provide any guidance on usage, but I have the impression that Visual Micro has a UI for debugging, whereas...
Not sure what you're asking here. Why doesn't Teensy have a hardware debugging interface? My understanding is it's mainly because (a) debugging is not a standard feature in the Arduino world, and (b) the closed-source bootloader is a major aspect...
Yes, there are many threads on this topic. There is no easy solution for hardware-based debugging. The hardware debug interfaces are not readily available. If you're interested in GDB-style debugging, search for messages by @BriComp. He uses it...
I've added an example which should help. It shows how to connect 4 cards using 2 SPI ports and the built in SDIO socket.
#include <SD.h>
const int cs_pin = BUILTIN_SDCARD; // socket on Teensy 4.1
const int cs1_pin = 0;
const int cs2_pin =...
I made the changes and added the MTP stuff in. I selected 'Serial + MTP' as I need both. Had a small glitch on compiling as it looks like MTP grabs some of RAM2, which I use as a secondary buffer when logging. I just reduced my buffer size a bit...
You're welcome. When Paul says that SD is a "thin wrapper" for SdFat, what that means is that SD fully contains SdFat. In other words, when you #include <SD.h>, you get all of SdFat, but it's inside the SD class, and you access it through the SD...
@slash2, the program below is the SdFat bench example modified to use #include <SD.h>. I think you should be able to make the same changes ot your program. Here's a summary:
replace #include "sdfat.h" with #include <SD.h>
delete all of the SdFat...
Thanks for the correction. To keep things clear, I didn't copy the entire code from my Jeannie_2 project.
I just wanted to show a simple example of how to quickly and easily read encoders using an MCP23017.