Hello,
I am trying to use the RTWDOG peripheral in one of my projects which also uses FreeRTOS.
I am attaching a demo where I have modified the FreeRTOS hello_world example. I am running it on the EVKIT.
What I observe is while configuring the RTWDOG peripheral if config.workMode.enableDebug = false; a WDT Reset is not triggered. When I watch RTDWOG->CS register in the debugger I notice that the watchdog doesn't start and my configuration is not applied to the register.
When config.workMode.enableDebug = true; the WDT starts and the core gets reset if WDT is not refreshed. But if I upload the same binary using the NXP-MCUBootUtility, then a WDT reset is not triggered.
Please have a look at my attached example program.
I am using MCUXpresso, SDK Version 2.7.0, Debugger: J-Link.
Regards,
Mahesh Murty
Hi @victorjimenez,
I noticed the note you have mentioned above in the user manual and also I saw the delay in the rtwdog example.
I have placed that delay initially in the above uploaded program but still the outcome did not change so may be I have removed it later.
Before posting here I did check the rtwdog example which was working fine in all the scenarios.
I was facing issues with my application and hence I created a new freertos_hello_world example to test the rtwdog behaviour.
The uploaded example and my application behave in a similar manner.
So can you please have a look at the uploaded example and let me know if I am missing something. Does the above example behave correctly when you upload it on the EVKIT?
Thanks & Regards,
Mahesh Murty
Hello Mahesh Murty,
I checked your example, and I didn't see your delay. Please be aware of the following note in the reference manual.
In your application, after you activate the clock, you didn't add any type of delay.
In the SDK example project, after activating the clock, we add the delay. For instance, the clock is activated within the main function.
After activating the clock, we jump into the function RTWdogFastTesting. Inside this function, before start configuring the RTWDOG, there's a delay. I wasn't able to see this delay or an equivalent in your application.
Regards,
Victor
Hello Mahesh Murty,
I made some tests on my end. I wasn't able to replicate the behavior that you mentioned. For my tests, I used the rtwdog example that we provide within the SDK. In this project, we configure the enableDebug as false, and the application runs without problems during the debug session. Are you aware of the following note in the reference manual?
This is why in the SDK example, we add a delay before configuring the RTWDOG registers. Did you add this to your application? I highly recommend you check this project to see if you are missing any configuration on your application.
Regards,
Victor