开发者

"CPU is not halted" and "No APB-AP found" error

开发者 https://www.devze.com 2023-01-14 23:17 出处:网络
When I use JTAG to load my C code to evaluation board, it loads successfully. However, when I executed my code from main(), I immediately got \"CPU is not halted\" error, followed by \"No APB-AP found

When I use JTAG to load my C code to evaluation board, it loads successfully. However, when I executed my code from main(), I immediately got "CPU is not halted" error, followed by "No APB-AP found" error.

I was able to load and executed the USB-related code before I got this error.

I googled for it and use JTAG command "rx 0" to reset the target, but it does not make any change.

开发者_C百科

I am using ARM Cortex-M3 Processor, J-Link ARM V4.14d, IAR Embedded workbench IDE.

Thanks for ur help.


One possibility: watchdog

If your hardware has a watchdog, then you must ensure that it does not reset the CPU when the JTAG wants to halt it. If the watchdog resets the CPU you would typically get a "CPU not halted" type of error you described.

If the CPU has an internal watchdog circuit, on some CPUs it is automatically "paused" when the JTAG halts the CPU. But on others, that doesn't happen, and you need to ensure the watchdog is disabled while doing JTAG debugging.

If your circuit has a watchdog circuit that is external to the CPU, then typically you need to be able to disable it in some way (typically the hardware designer provides some sort of switch/jumper on the board to do so).


are you re-using the jtag lines as gpio lines and clobbering the jtags ability to communicate with the chip? I bricked a stellaris board that way.


Make sure you have this line in code:

WatchdogStallEnable(WATCHDOG0_BASE); // stop the watchdog when CPU stopped

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号