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.

RTOS/TM4C1294NCPDT: Getting full time period in the timer.

Part Number: TM4C1294NCPDT

Tool/software: TI-RTOS

Hello guys,

I am using the timer in my code , the archived file of which is attached to this post , https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/908/TimerTest.7zb

but I am unable to use the timer as I waned.

Actually first of all I do not know whether the timer is 32 bit or not, meanwhile assuming that timer is 32 bit , I want it to run continuously upto its maximum count of 0xffffffff and than reset to zero and again start counting in the upward direction upto its maximum value.

So I want to know that how can I achieve this in my this code.

Please suggest the proper parameters.

regards

  • Hi Piyush,

    The SYS/BIOS Timer module for TM4C1294NCPDT programs the timer in the down-counting mode.  It uses the timer in 32-bit mode, so the period register is 32-bits.  FYI, this GPT timer can count both up or down, and in 16-bit or 32-bit mode, but SYS/BIOS doesn't provide any interface to affect this and is hard-coded to down-counting 32-bit.

    If you use a Timer_Params.periodType of Timer_PeriodType_COUNTS and a Timer_Params.period value of 0xFFFFFFFF then the timer will count down from 0xFFFFFFFF to 0 and get reloaded with 0xFFFFFFFF on the next cycle.  With this setup, if you use ~Timer_getCount() then you should be able to achieve a sequence that starts at 0 and counts up to 0xFFFFFFFF, rolling over to 0 on the next cycle.

    Regards,

    - Rob

  • Also , is it possible to program this timer in such a way that it counts from 0 to 0xffffffff in 1 second of time period , I mean when the timer complete its count from 0 to 0xffffffff , the time elapsed should be of 1 second.
  • Piyush Pandey22 said:
    Also , is it possible to program this timer in such a way that it counts from 0 to 0xffffffff in 1 second of time period , I mean when the timer complete its count from 0 to 0xffffffff , the time elapsed should be of 1 second.

    No, this would require a 4 GHz timer clock.  The timer counter register is just counting the clock pulses on its input.  There are a variety of inputs that can be selected, but none are 4 GHz (or even in the GHz range).

    Regards,

    - Rob