If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Problems with below 1us IntervalTimer in Teensy 4.0

As this is my 1st post let me introduce myself. I'm CAR, a mechanical engineer struggling to learn embedded coding and some electronics.

After learning the basics, I proposed myself to sample a 100kHz signal. To test it, I used an internal PWM of my Teensy 4.0.

To measure time, I use the IntervalTimer function included in Teenduino, nevertheless, whenever I try to sample at a frequency below 1.6us I'm unable to capture any data. Could anybody help me?

In my opinion, I'd need a sample rate of 1MHz to properly measure the signal that I intend to measure and, as far as I understood the F_BUS is 150MHz in the Teensy 4.0 so It should be more than enough.

I don't remember which build this made it into. But if you have not tried it you might try the latest release, which allows the T4 to have as at least as fast of Interval Timer as T3.2...

But of course everything is a trade off. That is you go for a faster clock speed than you can get faster timers, but on the other side you can not have one that is as slow... Don't remember the maximum periods of each .

As simple as it may seem, it's just a push button that triggers the interrupt.

Simple is always better.

I read your post and find myself in exactly the same position (mech. engineer learning embedded systems, etc). Up until now I have been using SDFat beta to record at 17us to SD card but the events that I am measuring last only 3 ms at most so I am very interested in hearing how your project goes and possibly moving away from SD cards myself, especially if you manage to record and capture samples at 1us successfully and would be willing to share your project later. Good luck!