STM32:STLink 将不再通过 SWD 连接

STM32: STLink won't connect through SWD any longer

第一次刷机正常,后续刷机失败

Error in initializing ST-LINK device. Reason: No device found on target.

在一块STM32H745 NUCLEO板上,我错误地启用了DEBUG接口和SWO引脚。有没有办法硬重置这个板?

"flashing under reset" 技巧没有奏效。也就是说,在 STM32_Programmer 通过 ST-Link 执行操作之前,按住重置按钮并立即释放它。一些 RTFM-ing 有时会有所帮助:

If a deadlock is faced due to a mismatch between the HW
board setting and the FW setting (LDO/SMPS), the user can
recover the board by doing the following:
- Power off the board
- Connect CN11 ‘BT0’ pin (BOOT0) to VDD using a wire
- This changes the BOOT0 pin to 1 instead of 0 and thus the
device boot address is changed to boot address 1 making the
bootloader starting in System memory, instead of starting the
FW in the user Flash (FW that is setting a wrong LDO/SMPS
configuration)
- Power on the board and connect using
STM32CubeProgrammer
- Erase the user Flash
- Power off the board and remove the wire between BOOT0
and VDD
- The board is now recovered and can proceed normally.

现在我想知道为什么我一刷新我的垃圾桶就死锁了...评论了一些代码并重建了,sill 做到了。

LE:发现违规行:

  HAL_PWREx_ConfigSupply(PWR_LDO_SUPPLY);
  ...

我的 SystemClock_Config 函数都是为 LDO 电源而不是 SMPS 编写的