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.

DM6437 Watchdog

Hi everyone

I'm trying to set up the watchdog timer on a DM6437. I've read SPRU989 and this post, but without any luck. Here is my setup code:

    CFG_TIMERCTL    = 0x00000001;    /* WDINT to force reset */
    TIMER2_WDTCR    = 0x00002000;    /* WDEN = 1 */

    TIMER2_TGCR     = 0x0000000B;    /* TIM12RS = 0x1, TIM34RS = 0x1, TIMMODE = 0x2 */
    TIMER2_PRD12    = 0xFFFFFFFF;    /* Maximum timeout */
    TIMER2_PRD34    = 0xFFFFFFFF;    /* Maximum timeout */

    TIMER2_WDTCR    = 0xA5C64000;    /* -> Pre-active state */
    TIMER2_WDTCR    = 0xDA7E4000;    /* -> Active state */

    temp = TIMER2_TGCR;

I notice that, despite setting TIMER2_TGCR up as 0x0B, it reads as 0x03. When I write 0xFFFF to WDKEY after this setup nothing happens, indicating that the watchdog is not active. What am I doing wrong?

Any help would be sincerely appreciated.

  • Leon,

    regarding this issue, I tried to setup a simple project based as well on the post you mentioned.

    Very simple, with BIOS 5.x running a task, within the first loop the watchdog is always reset, afterwards it is left running and thus resets the system

    You can notice it is working as expected because as the watchdog expires: the leds stop cycling, CCS 3.3 reports a target reset occurred, plus the device is with the program counter inside the ROM address range (so it really got a reset)

    This was tested on an EVM (6424, but DM6437 should be similar) without specific setups

    Please find the project attached.

     

    My guess is that the problem with your code is that you enable the timer first,

    Leon de Wit said:
    TIMER2_WDTCR    = 0x00002000;    /* WDEN = 1 */

    then write A5C6h (the key) afterwards

    Leon de Wit said:
    TIMER2_WDTCR    = 0xA5C64000;    /* -> Pre-active state */

     

    In my understanding the timing diagram in figure 10 of the user guide shows instead that to move from the initial state to the preactive state (when you enable the watchdog) you have to write WDEN and the key, I would say at the same time (since they they are reported both on the transition arrow and relate to the same register)

     

    Best regards,

    Giancarlo

     

    watchdog.zip
  • Hi Giancarlo


    Thanks very much for all the trouble you took. This issue had me so exasperated I  ended up implementing the watchdog reset externally using the functionality provided on my RTC. I did this because, after reading the post here, which deals with silicon errors on the DM648, I was worried that my DSP might have the same issue.

    I had a look at your code, and this now works on a different unit of my hardware. The interesting is: my code works too! It definitely did not work on the unit I tested with last week (I spent almost a day fiddleing without success) I'm sure I tested with and without the

    TIMER2_WDTCR    = 0x00002000;    // WDEN = 1

    line.

    Do you know of any reason the watchdog would not kick, if set up correctly? I'm going to have a look at my schematic again and make sure I don't have pins being pulled to an erroneous state.

    Thanks again for your help

     

  • Leon,

    as for today I did not hear of similar silicon issues on the DM643x / C642x device, which is a very different silicon die than DM648

    On such strange behaviors, yes perhaps it is a good idea to check the hw setup and power up configuration, it might have an influence on the overall state of the device

    There might be also other pcb related problems of course, if the assemblies you have show a different behavior - but I did not get feedback so far on specific hw issues which lead to watchdog problems, so unfortunately I would not have a specific direction to point you to for the analysis

    Hopefully other users which could have had a similar experience, might chime in

     

    best regards

    Giancarlo