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.

How do I enable the prescaler for Edge-time mode of Tiva TM4C123GH6PM?

Other Parts Discussed in Thread: TM4C123GH6PM

I read from the datasheet of Tiva TM4C123GH6PM (page 712) that "When operating in Edge-time mode, the counter uses a modulo 24 count if prescaler is enabled."  But I could not find out how to enable the prescaler.

I appreciate if anybody can point me to the right direction.

  • Hi Shujen,

         See, TimerPrescaleSet() at Tivaware Peripheral Driver Library User's Guide.

    -kel

  • Could you be more specific about the User's Guide?  What I found in the DRL-UG is:

    "The availability of the prescaler varies with the Tiva part and timer mode in use. Please consult the datasheet for the part you are using to determine whether this support is available."

    And I am back to square 1.

  • I think this question is better posed as "What is the purpose of the Prescale Register in Edge-Time mode?". The datasheet is not very enlightening as to how this register is to be used in something like the Edge-Time mode. Is it a mask for the upper 8 bits of the 24-bit timer value (assuming one is using the 16 bit mode)? Or, does it simply initialize the upper bits of the prescale register to some value? OR...does any value other than 0x00 enable the prescaler? OR...?!?!!?? My experiments indicate that writing different, non-0 values to this register produces seemingly different timer results for a constant square wave input. While I could concoct an elaborate experiment to try to deduce the behavior of this register, I would generally expect this to be covered in the datasheet, so please don't direct me there, because I can not find anything that details the behavior of this register (and the block diagram is of no assistance).