Teensy 3.x nanosecond delay function?

Status
Not open for further replies.

renasis

Active member
Hello,

Is there a library or function that I can call to get nanosecond delays on Teensy 3.x(something similar to _delay_ns for AVR)? I am working with al422b fifo memory. It's datasheet recommends pulse widths ranging from 2-20 nanoseconds.

Thanks,

-ren
 
Last edited:
One (1) clock cycle at 96MHz is 10 nano seconds. I don't know how long an instruction takes, but it is probably at least one clock cycle. So a NOP (if that instruction exists) could do that. This is a very fine amount of time and not really practical to provide a nanosecond function. You might need hardware support to get finer timing than what an instruction can provide.
 
Demolishun,

Thanks, I did find the nop function in the Teensy library __asm__ volatile ("nop");. I will try to use that with F_CPU define to come with something that is scalable.

-ren
 
a quick look at the data sheet for the al422b FIFO memory. Designed for TV frame store applications - not general purpose.
Most of the timing is x nSec "min", and no max is spec'd. I note some with a 1000nSec (1uSec) max.

Writing code on a teensy (or other) to manipulate this FIFO's control bits seems like a job for custom logic chips and FPGAs.
 
Status
Not open for further replies.
Back
Top