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.

MSPM0G1519: Timer counter direction in up/ down mode

Part Number: MSPM0G1519


Hello,

Is there a way in TIMA for a user to determine which direction the timer counter is currently counting in software?

The CTRCTL.CM doesn't help here since we then just know that the timer is in up/down mode but not the current direction.

Munan

  • Any feedback here?

    Munan

  • Hi Munan,

    customer want to check current in up phase or down phase, and the configuration is UP/DOWM mode, correct?

    Why they need know this one? We have separate CC interrupt for UP or DOWN.

    Another idea here is enable Load and zero interrupt, then use those interrupt flag to check current mode.

    Thanks!

    Best Regards

    Johnson 

  • Hey Johnson,

    The reason why this is needed is because the customer wants to count the duration of a fault condition in the timer, so in order to do that they need to know the start and end count and direction and at least one of the directions because it is possible for the timer to have either hit the timer period count or zero and changed direction. The fault condition is also asynchronous to the cc events.

    And yes, you can use the load events or zero events to change a software flag but ideally there's a way in hardware to do this to reduce software overhead.

    Munan