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.

Timer Prescaler

Other Parts Discussed in Thread: EK-TM4C1294XL, TM4C1294NCPDT

Hi all,

Apologies, I am revisiting an old issue of mine - measuring duty cycle. We are considering the use of the TimerPrescaleSet () function to extend the range of the Timer used to capture edge events. However, I have a few questions that I can't quite find the answer to in the datasheet or the driver library.

  1. The datasheet mentions that the value of Timer n and the Prescaler are latched into GPTMTnR and GPTMTnPS respectively. Accessing the driverlib/timer.c file, the function TimerValueGet() obtains a different value and my program seems to continue working. Why is that so?
  2. Is there a function that obtains the snapshot value of the prescaler? Looking again in the driverlib/timer.c file, TimerPrescaleGet() obtains the the GPTMTnPR, which again, is not the value that I would like to capture. However, since TimerValueGet() works fine, would TimerPrescaleGet() also work fine?

In short, am I required to access the registers directly and perform bit manipulation in order to obtain the correct values during each event should I use the prescaler.

For reference:

  • I am using EK-TM4C1294XL development board with a TM4C1294NCPDT MCU.
  • CCS 6.1.0 as a development environment

Thank you,

Stephen