Hi, I'm using SWT module now. My code can't realize the reset function. This is my code. I don't know what's wrong with my code. Can you give me some guidance?
This is my clock configuration
This is my watchdog initialization configuration
In addition, Does the reset module need to be configured manually? Or does SWT timeout automatically trigger the route to reset?Can you give me some guidance? thank you.
Hello,
If I understood you correctly, you want to generate reset on SWT_0 timeout, right?
There is nothing special, your reset will be generated if you enable SWT (enabled by default) and you wont service it.
Have in mind that you cant debug it, as debugger is by default disabling SWT (so you can debug).
Best regards,
Peter
hi,
Thank you for your reply.
I'm using boot loader. Can you help me see if my watchdog configuration is correct? If there is any problem with my code, please guide me, thank you.
Hello,
I have just tested it and it is working with no issues:
You simply set TO, enable SWT and enable watchdog in your debugger(in case you want to test it in debug mode).
Reset will occur according to settings of SWT_CR.
Best regards,
Peter