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: TM4C123

Part Number: TM4C123GH6PM

Is it possible to configure a 64 bit Timer/counter as an up/down counter, where the up/down mode will be controlled by a Low/High level on an input pin rather than GPTMTxMR register programming. The register configuration will only allow a fixed mode (?), either up or down.

Thanks and Kind Regards,

Sudhir Gupta

  • Hi,

      The timer can only be configured to either count up or count down? In either direction (up or down), an interrupt can be generated when a match value is reached or when the timer time-out. The mode register is preconfigured by the software before the timer operation starts. It cannot be controlled by an external pin.  Not sure about your application why you would want to count up and down in the same timer operation. 

  • Hi Charles,

    Thanks for the reply. I did think about changing the mode by reconfiguring the register, as soon as a direction change interrupt has been received. Although, I am not sure if it is possible to change the up/down mode on the fly and without impacting the count. The application will be the total linear distance covered by a mobile robot , which may be required the reverse on facing an obstruction. Of course, it may be an overkill. for a simple application.

    Regards,