Fastest bit toggle rate using teensy 4.1 timers and interrupts


New member
Hi there,
I need to generate a 5MHz data transfer. I have used teensytimertool, interval timer so far but the pin doesn't toggle beyond 500ns period(high+low part).
Any help would be appreciated please.
Furthermore, as I increase it from 1us period, the jitter increases too. Around 120ns for 500ns period.
Can you say more about what you mean by "data transfer", and why do you want to do this with timers and interrupts?
On every interrupt call I want to transfer binary data (bit by bit)to a gpio pin. Let's say 1011, it means
Pin high for 200ns
Pin low for 200ns
Pin high for 200ns
Pin high for 200ns

Why use interrupts? Because I have to perform some calculations and ADC data intake when not in isr..
You may not be able to achieve a 5-MHz interrupt rate, and if you do, you'll have little or no time for other I/O or calculations. I think you need to look for a different approach.