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.

MibSPI, start value of TICKCNT on re-enable

Hi,

I refer to the TRM for TMS57012x - spnu515b.

The description of the field TICKENA in register TICKCNT reads:

When the tick counter is enabled it starts down-counting from its current value. When TICKENA
goes from 0 to 1, the tick counter is automatically loaded with the contents of TICKVALUE.

How can the counter start from its current value if it is reloaded at the same time? Am I missing something?

In case the latter sentence is the correct one, the question arises whether the (re)load on (re)enable is accompanied by a toggle of the trigger signal.

Regards,

Rainald

  • Hi Rainald,

      Perhaps it is not clear in the TRM. The first time when you enable the tick counter by setting the TICKENA bit the counter is first preloaded with the value from the TICKVALUE register. It will then starts to down count until the counter underflow (the counter value becomes zero) by which time the counter is reloaded with the TICKVALUE again. 

  • Hi Charles,

    the words "from its current value" indicate that the description is not about the first time the tick counter is enabled.

    The question whether the (re)load on (re)enable is accompanied by a toggle of the trigger signal is still open. If the (re)load on (re)enable is a consequence of an underflow (start counting down from 0), it would appear logical that the trigger signal is toggled. If it is not toggled, the "explanation" could be that the reload on re-enable is similar to the reload on writing a 1 to the RELOAD bit.

    A related question is whether disabling the counter by setting TICKENA to 0, which is said to force the trigger signal low, would lead to activation of the TGs that are configured for falling edges (if the trigger signal happens to be high when the tick counter is disabled).

    Regards,
    Rainald

    Edits: Made plausible the uncertainty. Added related question.