I enabled the debug bit in the wdog CS register, but when I debug with J-Link and set breakpoints, the wdog still times out and triggers a reset. How can I resolve this issue? Additionally, I used the tstmr, but the timestamp continues to update after I set a breakpoint, and the debug bit in the system counter's CNTCR register also has no effect. Does the i.MX-93 have a global debug switch that I might have overlooked? Thank you for your response!
Solved! Go to Solution.
Hi @leoX
Can you add tstmr based on the wdog demo and then try to reproduce it?
At least the debug function can work on wdog demo, maybe there are some usage issues. That's better to provide a simple demo that can reproduce it on my side.
Best Regards,
Zhiming
Hi @leoX
Can you share where you set the breakpoint? I set here and don't see watchdog reset.
Best Regards,
Zhiming
Hi Zhiming
I tried it on EVK and my board, and the reset occured on two boards, and I'd like to confirm if you can resume running from the breakpoint after stopping at it? I was also able to run to the breakpoint, but when I reset at the breakpoint, I couldn't continue running
Hi @leoX
The refresh cycle cannot be stopped. If it is stopped, the counter will stop being cleared. When the counter is full, an interrupt is triggered to reset it. So you should not set breakpoint in that loop.
Best Regards,
Zhiming
Hi Zhiming
That means when the breakpoint halts the mcu, the couter is still running?
Best Regards.
Hi,
The core is reset when you meet this issue, not halted.
Best Regards,
Zhiming
Hi Zhiming
So in fact, when wdog is turned on, I can not set breakpoint during debugging because it will reset. Even if the debug position is set to 1, in other words, when a breakpoint is set, both the wdog counter and the system counter are continuously counting. Is that true?
Best Regards.
Hi,
Even if the debug position is set to 1, in other words, when a breakpoint is set, both the wdog counter and the system counter are continuously counting.
-->If you set breakpoint in refresh loop, this will stop feeding watchdog, causing reset.The debug flag is not used to debug watchdog step by step, that flag make sure watchdog can work under soc debug mode.
Best Regards,
Zhiming
Hi
Is there a way to halt the wdog counter and system counter while debugging? Is there anything I can do when I want to step through code other than disable wdog?
Best Regards.
Hi,
I think the only way is to avoid step over debug refreshing wdog code.
Best Regards,
Zhiming
Hi
I want to halt the counter during breakpoint debugging; otherwise, when running from the breakpoint, the controller environment will have already changed. In my project, no matter where I set a breakpoint, as long as the wdog is enabled, it will trigger a reset, making debugging impossible, but thank you for your response.
Best Regards.
I set up a watchdog in my project, using wdog1 to monitor the operation of m33. However, even when I set the debug bit of the wdog cs to 1 and use JLink to debug with breakpoints, a reset still occurs (entering my watchdog interrupt function).
Best Regards
Hi @leoX
Can you add tstmr based on the wdog demo and then try to reproduce it?
At least the debug function can work on wdog demo, maybe there are some usage issues. That's better to provide a simple demo that can reproduce it on my side.
Best Regards,
Zhiming
Hi. Zhiming
I modified the code as yours and set the boot mode to 1010 from M33 core , but it didn't work.
Best Regards.
Hi,
Can you try the a53 download mode or m33 download mode ? And the previous test is based on Debug , not Attach.
Best Regards,
Zhiming
Hi,
Could you explain it more clearly? Do you mean using the serial download mode? Thanks.
Best Regards.
Hi Zhiming,
Do you mean using the uuu command to download the bin file to the m core?
Best Regards.