This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TM4C123GH6PM: Free running timer, or using systick without creating interrupt

Part Number: TM4C123GH6PM

Tool/software:

Helo,

I have (almost) implemented ntp like syncronization from computer to tm4c123.

Is there a way to configure a counter in free running mode, preferably up, and then read the this counter when certain events happen?

Can systick be instrumented to work without the interrupt generation just as a counter to accomplish this?

Best Regards,

C.

  • Is there a way to configure a counter in free running mode, preferably up, and then read the this counter when certain events happen?

    Hi Can,

      In the Timer module, there is the free running counters GPTMTAV and TPTMTBV. You can write to these free running counters to initialize their starting values. By default after reset they are 0xFFFFFFFF. You can setup the timer in periodic mode with a maximum preload value and without interrupt interrupts. The free-running counter will just counter count up and once expires it will roll back to zero again. You can read the free-running GPTMTnV registers at any time.  SysTick counter works much the same if you don't enable the interrupt. The difference is that the SysTick always uses SYSCLK as the timebase and the counter is only 24 bits wide while the Timer counters can be concatenated into a 32-bit counters or if you use the wide-timer the length can be 64-bit.