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

Thread: GPT1/GPT2 for compare and capture

  1. #1

    GPT1/GPT2 for compare and capture

    Hi all,
    For a project I need two tachometers and using the "compare and capture" registers connected to the GPT on T4.1 seems like a logical choice. I can however not seem to find any documetation from NXP on what pins I can use with GPT and I couldn't find good results here on the forum. No mention of pins seem to indicate that any interrupt pin could be used? I'd use FreqCount or FreqMeasure, but they appear to only work with specific pins.

    Anyone used GPT1/2 for counting that can share some knowledge/experience?

    Thanks!

    J

  2. #2
    Digging deep into the 3500+ page reference manual for the imxrt1060 series, I found details on GPT in chapter 52 and TMR in chapter 54 in Gated-Count Mode. I'll research this further.

    It would still be very useful to hear from others with experience in using these.

    J

  3. #3
    Quote Originally Posted by jensa View Post
    Digging deep into the 3500+ page reference manual for the imxrt1060 series, I found details on GPT in chapter 52 and TMR in chapter 54 in Gated-Count Mode. I'll research this further.

    It would still be very useful to hear from others with experience in using these.

    J
    If you haven't looked at TeensyTimerTool, it's an excellent starting point for anything you might want to do with timers.

  4. #4
    Senior Member
    Join Date
    Apr 2014
    Location
    Germany
    Posts
    1,850
    Quote Originally Posted by joepasquariello View Post
    If you haven't looked at TeensyTimerTool, it's an excellent starting point for anything you might want to do with timers.
    Thanks for the shout out but the TimerTool only uses the timing functions, counting is a different thing. I recommend manitous collection of snippets https://github.com/manitou48/teensy4 instead. You will probably find something useful there.

  5. #5
    Thanks! I found exactly what I need there. Great suggestion @luni!
    This validates what I found in the datasheet, so now I can add the supported pins to my custom T4.1 board.

Posting Permissions

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