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.

Reinitialize Watchdog of DM6437

Hi,

i am programming an application for TI DM6437 DSP and I like to use the watchdog for two purposes:

1. The bootloader loads the application, activates the watchdog and starts the application. If the application image is broken and does not start correctly (say after 10 seconds), then the watchdog resets the DSP and the bootloader can start a recovery application.

2. If the application starts correctly, it re-initializes the watchdog. Then, a timeout should occure already after 4 seconds.

What is not working by now is this re-initialization. Starting the watchdog for the first time after power on forks fine. But if I try it the second time, I cannot set the WDEN-flag in TGCR register.

This is my sequence for re-init:

CFG_TIMERCTL &= ~1 // prevent DSP reset

if (TIMER2_WDTCR & WDTCR_WDEN) {

TIMER2_WDTCR = 0; // force timeout by writing wrong key

TIMER2_WDTCR |= WDTCR_WDFLAG; // clear timeout flag

}

CFG_TIMERCTL |= 1 // enebale DSP reset

// init TGCR and PRD registers

TIMER2_WDTCR = WDTCR_WDEN;

// write correct keys to WDTCR

 

What I see is, that forcing timeout and clearing the timeout flag works as expected. TGCR is then '0'. But setting the WDEN flag has no effect, the TGCR register stays '0'.

Do I forget something or is such a re-init not possible at all? Thanks for your help.

Tobias