Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 2 of 2

Thread: using Teensy4.1 timers and their interrupts

  1. #1
    Junior Member
    Join Date
    Feb 2021
    Posts
    1

    using Teensy4.1 timers and their interrupts

    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.

  2. #2
    Senior Member
    Join Date
    Apr 2014
    Location
    Germany
    Posts
    1,450
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •