Teensy 4.0 and the super slow interrupt

arunmagesh

New member
So i am trying to analyse how fast the isr starts from a trigger event and see how I can optimise it for faster one.

My current setup is just using attachInterrupt() and the isr function contains just a single DigitalWriteFast(). Under my scope the time between the positive edge and the gpio trigger is close to 130ns which is very long considering it's running at 600MHz and code is optimised for smaller code. Upon reversing the elf file I see just as close to 20 instruction before writing to gpio after the function is called. so problem I am guessing is in the way isr is being called.

I went through a lot of forum post and couldn't find a way to optimise but came to some understanding that it's because of the way isr checks all the port for isr instead of single pin in 4.x.
 
Back
Top