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.
Hi,
It's said in the RM57Lx TRM doc, the Digital Watchdog is disabled by default.
Besides, in SafeTI Diagnostic Library Software Safety Manual, diagnostic library is not applicable on DWD module diagnostic.
Can you please indiacate how to enable the DWD module, how to use it, and how to diagnose it? Thanks.
Hi Shenruming,
If you go through the "Help Topics" section in HALCoGen, there you can find the example for watchdog.
In this example they are feeding the watchdog for sometime(ctr<5) and after that they are disabling the feeding of watchdog. Once they disabled it the watchdog will RESET the device.
--
Thanks & regards,
Jagadish.
Hi Jigadish,
In this example, we just find the operation of reset watchdog. Function dwdReset() is used to feed watchdog. Where is the function call to reset the device when stopping servicing DWD? We just find the NMI setting by running dwwdInit(Generate_NMI), not dwwdInit(Generate_Reset). So I guess it won't trigger system reset.
Hi Shenruming,
Where is the function call to reset the device when stopping servicing DWD? We just find the NMI setting by running dwwdInit(Generate_NMI), not dwwdInit(Generate_Reset). So I guess it won't trigger system reset.
The WWDRXN field in the register RTIWWDRXNCTRL will decide whether the device need to reset or need to generate NMI if watchdog failed to feed.
If this value is 0x5 then device would get RESET if the watchdog failed to feed or else if this value 0xA then NMI would generate if the watchdog failed to feed.
Either you can manually change this register value by giving required value before watchdog gets enabled or else you can use the function "dwwdInit".
As you can see the second argument to this function can be either Generate_Reset or Generate_NMI. If you pass the Generate_Reset as second argument to this function, then device would get reset if watchdog failed to feed or else if you pass Generate_NMI then only NMI interrupt would get generate if the watchdog failed to feed.
Note:
The default value of WWDRXN field in the register RTIWWDRXNCTRL is 0x5, that means if we didn't write anything into this register then it will be configured for RESET device, only if we write oxA then the device will generate NMI without any RESET.
--
Thanks & regards,
Jagadish.
Hi Jadadish,
How do we receive the non-markable interrupt after we select the NIM as reaction and the watchdog is not serviced?
Hi Shenruming,
Interrupt Channel-0 is called as NMI interrupt.
And watchdog NMI interrupt will be comes into the ESM2.24 channel. So, whenever watchdog time expires you will get "esmHighInterrupt" with ESM2.24 channel SET.
The most important thing is that, as ESM High interrupt is a FIQ interrupt we should call the "_enable_interrupt_" API to enable both IRQ and FIQ interrupts in our code, then only ESM high interrupt will get generate after watchdog time expires.
I am attaching the code for your reference:
Watchdog_NMI_Test_RM57.zip
--
Thanks & regards,
Jagadish.