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.

MSP430FR2355: Implementing "Watchdog" using Timer_B for external MCU (STM32)

Part Number: MSP430FR2355

Hi, I want to implement a watchdog timer with a MSP430FR2355 Timer_B, which has to be reset periodically by a second MCU (STM32). If the second MC does not reset the timer within one second, an interrupt must be triggered on the MSP430.

- How do I have to configure the registers?
- Is there a code example?
- Which pin must be used for the watchdog reset? TB1TRG?

Regards,
Eric

  • It sounds like you should be reading the documentation on MSP430 timers. Also, if you are going to all this trouble for an external watchdog, you should probably read: http://www.ganssle.com/watchdogs.pdf

    Although I am trying to figure out how this differs from using the regular MSP430 watchdog and having a pin interrupt (triggered by the STM32) reset the watchdog.

  • Hi David, thanks for the interesting reading. I liked it.

    The internal watchdog is reserved for the MSP430FR2355. The second MCU (STM32, main controller) has currently no external watchdog. Therefore I want to use a timer_A of the MSP430FR2355 as watchdog for the second MCU.

    I want to realize the following:
    - Timer_A counts to zero within one second.
    - Normally the second MCU pulls a pin of the MSP430FR2355 periodically high (<1s), which restarts the countdown.
    - When the counter reaches zero an interrupt is triggered, this causes the MSP430FR2355 to reset the second MCU.
    - Optional: The signal of the second MCU must arrive within a defined time window (e.g. 0.9 -1.1s) otherwise the reset is triggered.

    I know how to configure the Timer_A as a countdown timer. Unfortunately it is not clear from the MSP datasheet how to reset the countdown timer via pin to the start value (without waking up the MSP430). One could certainly wake up the MSP430 via GPIO interrupt to reset the countdown, but I would like to realize this in hardware if possible. Can I use the TB1TRG pin for this? If so, how do I have to configure it? Is there a code example?

  • Hi Eric,

    TB1TRIG is used to trigger TB1OUTH:

    Thus this can't clear Timer B counter value, for your requirement I think you can use a GPIO interrupt to clear Timer Counter value to impletement reset function:

    • Timer B configurate x seconds period
    • Enable GPIOx as the input to clear Timer B
    • Clear Timer B counter value in GPIOx interrupt route:

    Attach some example as your reference:

    https://dev.ti.com/tirex/explore/node?node=A__ACOv5ISK3wggR-1Htbwzog__msp430ware__IOGqZri__LATEST

    Thanks!

    Best Regards

    Johnson

  • Hi Johnson, 

    Thanks for clarifying. I will implement it as described above. 

    Best Regards,

    Eric

**Attention** This is a public forum