在MDK調試STM32出現“could not stop cortex-m device”解決辦法
錯誤圖片如下:




我的解決辦法:
發(fā)現RESET一直在1V附近,將RESET處的下拉電容換掉后第一個(gè)錯誤沒(méi)有,但是跳出下面的錯誤:No Cortex-M Device found in JTAG chain。
解決辦法:發(fā)現JTAG線(xiàn)沒(méi)插上,插上就好了。
http://no001.blog.51cto.com/1142339/857117
網(wǎng)上的解決辦法:
1 我遇到這個(gè)問(wèn)題的原因是Boot1沒(méi)接地,所以可以考慮下是否是硬件的原因
2 如果MCU出于reset狀態(tài),也會(huì )出現這種情況。我的火牛板子,應為串口上有個(gè)復位的跳線(xiàn)被我端接后,一直不正常,拔掉就OK了!
3 我試過(guò)以前正常的板和程序,現在均有問(wèn)題,也看過(guò)了編譯選項,有選的,不過(guò)換成MDK4.10就正常了,原因不了解
4 上面寫(xiě)的清楚啊,reset接地了?;蛘呤蔷幾g選項里你沒(méi)選器件?或者是下載選項里沒(méi)選器件?
5 原子告訴我吧BOOT0設置為1,下載程序,再恢復BOOT0為0,之后就能用了。
6 體現象是,可以下載,但是一運行就沒(méi)辦法中斷,系統的提示跟樓主的一樣。一開(kāi)始以為是硬件或者ULink調試器設置的問(wèn)題,查了很久,最后發(fā)現確實(shí)是主頻過(guò)高。因為ST的例子代碼,默認是8M晶振,鎖相環(huán)9倍,結果我外部是25M晶振,就變成了25×9=225M!不知道什么原因,不過(guò)把頻率改了,暫時(shí)沒(méi)出現問(wèn)題。
7 In my own experience I have usually seen this error when either the ULINK2 is disconnected and reconnected while in the middle of a debug session or if you have some external hardware, outside of the control of the debugger, that is acting on your processor.
If the ULINK2 was disconnected mid-debug, then usually cycling power to your device will fix the problem.
If you have something like a watchdog timer that is trying to reset the processor while you are in the middle of debugging, then you will have to disable the watchdog before you can start a debug session
評論