1. 程式人生 > >STM32F10x 學習筆記9(解決JLink 無法下載程式的問題)

STM32F10x 學習筆記9(解決JLink 無法下載程式的問題)

今天在玩開發板時不小心下載了個有問題的程式,然後就悲劇了。無法往晶片中燒寫程式了。每次想下載程式都會彈出如下的兩個錯誤對話方塊。

然後訊息視窗顯示如下的錯誤資訊。

JLink info:
------------
DLL: V4.15n, compiled Jun 18 2010 19:55:09
Firmware: J-Link ARM V8 compiled May 20 2010 17:07:46
Hardware: V8.00
S/N : 24446459 
Feature(s) : RDI,FlashDL,FlashBP,JFlash 
 
* JLink Info: Could not measure total IR len. TDO is constant high.
**JLink Warning: No matching core found.
* JLink Info: Could not measure total IR len. TDO is constant high.
* JLink Info: Could not measure total IR len. TDO is constant high.
* JLink Info: Resetting target using RESET pin
* JLink Info: Halting CPU core
**JLink Warning: Received 0 as core Id.
***JLink Error: Could not find supported CPU core on JTAG chain
Bad JTAG communication: Write to IR: Expected 0x1, got 0x7 (TAP Command : 2) @ Off 0x5.

百度了一下,沒找到什麼有用的資訊。還是要自己想辦法解決。首先,我的JLinkSTM32 晶片都不大可能就這麼壞掉了。多半是燒寫進去的軟體有些問題,佔用了相應的IO 管腿,導致無法利用JLink與之通訊。那就想辦法不讓這個錯誤的程式運行了。STM32 中是自帶了BootLoader的,切換進BootLoader 中就可以了。具體的方法就是通過BOOT1BOOT0兩個跳線來選擇啟動模式。

斷電,改跳線,重新上電,進入BootLoader 模式。用JLink 下載新的程式,下載成功。再斷電,把跳線改回來,重新上電,一切正常。問題解決!