using Teensy4.1 timers and their interrupts

Status
Not open for further replies.

Boothby

Member
Trying to understand the timers of the NXP processor i.MX RT1060 used in the Teensy4.1 , their interrupts, and how the Arduino IDE uses /allocates them. in particular, the intervaltimer appears to be the only timer that one can assign a priority to in the Arduino language. Have no idea which of the many hardware timers it is using. there are 6 general purpose timers GPTx and 4 of QTIMERS. the imxrt.h sheds light on this but would like to avoid that level of code writing. As it may interfere with milli() microseconds() as example if you don't know. Does anyone have information or know where i can find answers to this topic? Thanks.
 
You can have a look at this library https://github.com/luni64/TeensyTimerTool which provides a high level interface to (some of) the Teensy 3.x and 4.x timers. Documentation can be found here: https://github.com/luni64/TeensyTimerTool/wiki

in particular, the intervaltimer appears to be the only timer that one can assign a priority to in the Arduino language. Have no idea which of the many hardware timers it is using
It is using the PIT module

there are 6 general purpose timers GPTx and 4 of QTIMERS. the imxrt.h sheds light on this but would like to avoid that level of code writing. As it may interfere with milli() microseconds() as example if you don't know.
No, millis uses the systick interrupt. But Teensyduino uses some of the timers for PWM (QTimer and FlexTimers for the T4.x). See here for more info on this. And of course other libraries may use other timers.
 
Status
Not open for further replies.
Back
Top