|

使用STLINK無法下載程序,提示如上圖所示。
解決方案:如下圖所示配置

其它需要配置的地方,和JLINK一樣。
使用STLINK時,需要注意一下上圖中的圓圈部分。
這個地方有四個選項,分別是Auto detect、HW RESET、SYSRESETREQ、VECTRESET。默認是Auto detcet,用STLINK需要改成HW RESET。
這四個選項的定義:
- Reset — HW RESET performs a hardware reset by asserting the hardware reset (HW RESET) signal.
- Reset — SYSRESETREQ performs a software reset by setting the SYSRESETREQ bit. The Cortex-M core and on-chip peripherals are reset.
- Reset — VECTRESET performs a software reset by setting the VECTRESET bit. Only the Cortex-M core is reset. The on-chip peripherals are not affected. For some Cortex-M devices, VECTRESET is the only way to reset the core. VECTRESET is not supported on Cortex-M0 and Cortex-M1 cores.
- Reset — Autodetect selects one of the above reset methods based on the target device. The SYSRESETREQ method is used if an unknown device is detected.
HW RESET意思就是硬件復位,SYSRESETREQ就是只給M內核和片上外設復位,VECTRSET就是只給M核復位。Auto detect就是自動選擇上面的三個中的一個復位。(這段話無法理解,不要緊,以后會理解的)
|
|