有時候無法下載
原因:
- 線太長,通信出錯,可能會提示 no target connected 或者 internal command error
- 有功耗較大的設(shè)備,導(dǎo)致供電不足,可能會提示internal command error
- 讀寫保護開啟了,可能會提示read out protection is activated,或者 ST-LINK connection error 或者can not read memory … …
解決:
- 線不要弄太長,短一點,或者盡量使用USB延長線進行延長,不要讓st-link的線太長了,如果非要很長的線的話盡量用屏蔽線,親測可以
- 給芯片足夠的電壓
- 關(guān)掉寫保護,使用STM32 ST-LINK Utility(Windows)來關(guān)掉讀寫保護,target–>option byte 中設(shè)置
無法調(diào)試: STM32 調(diào)試停留在LDR R0, =SystemInit,不能自動Run to main
出現(xiàn)最多的情況就是設(shè)置的斷點過多,可以把斷點全部刪除試試看,STLink只能設(shè)置5個