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.

TMS570LS3137: How often can I write the Watchdog WDKEY?

Part Number: TMS570LS3137

Hello,

I have a very short Watchdog Timeout of 1ms. I am trying to service the watchdog (write to WDKEY) twice every 1ms. (The second write is not very deterministic and happens very fast sometimes.)

According to the spnu499.c pdf, Page 443, Section 13.2.5.1 there is a NOTE:

"Care should be taken to ensure that the CPU write to the watchdog register is made allowing
time for the write to propagate to the RTI."

Based on this note, I assume I am hitting that WDKEY too fast, but I don't know how much "care" I need to give it.

 

How long do I need to wait before I can write to this register again?

Thank you for your help.

Regards,

Ryan 

  • Ryan,

    This note means that a write to the WDKEY register takes about 15 CPU cycles. That  is, the actual write to the WDKEY register happens 15 CPU clock cycles after the CPU has "written to the WDKEY register". It could take even longer if the peripheral register space is defined as "bufferable". In this case a write is buffered until another access to the peripheral register space happens (posted write).

    So it is recommended to read back from the WDKEY register after you have written to it (to ensure that the write completes). Also, the interval for servicing the watchdog needs to account for the 15 CPU cycles it takes to write to the WDKEY register.

  • Thank for the info, I think that will work for me.

    Regards,
    Ryan