无法从STM32 B-U585I-IOT02A检测到蓝牙
Can't detect bluetooth from STM32 B-U585I-IOT02A
我正在使用来自 STM32CubeIDE 1.7.0 的 BLE_AT_CLIENT 示例,但在 ST BLE SENSOR 应用程序或我的 computer/smartphone 正常蓝牙扫描中未检测到任何内容。我有 2 个 B-U585I-IOT02A,并且都在 teraterm 上给出了完全相同的错误消息。
error message on teraterm
这里还有来自控制台的日志。
STMicroelectronics ST-LINK GDB server. Version 5.9.1
Copyright (c) 2021, STMicroelectronics. All rights reserved.
Starting server with the following options:
Persistent Mode : Disabled
Logging Level : 1
Listen Port Number : 61234
Status Refresh Delay : 15s
Verbose Mode : Disabled
SWD Debug : Enabled
InitWhile : Enabled
Waiting for debugger connection...
Debugger connected
-------------------------------------------------------------------
STM32CubeProgrammer v2.8.0
-------------------------------------------------------------------
ST-LINK SN : 004000204741500320383733
ST-LINK FW : V3J8M3
Board : B-U585I-IOT02A
Voltage : 3.30V
SWD freq : 24000 KHz
Connect mode: Under Reset
Reset mode : Hardware reset
Device ID : 0x482
Revision ID : Rev Z
Reconnecting with the recommended frequency (1000 kHz)!
ST-LINK SN : 004000204741500320383733
ST-LINK FW : V3J8M3
Board : B-U585I-IOT02A
Voltage : 3.30V
SWD freq : 1000 KHz
Connect mode: Under Reset
Reset mode : Hardware reset
Device ID : 0x482
Revision ID : Rev Z
Reconnected with the recommended frequency (3300 kHz)!
Device name : STM32U575/STM32U585
Flash size : 2 MBytes
Device type : MCU
Device CPU : Cortex-M33
BL Version : 0xc0
Debug in Low Power mode enabled
Memory Programming ...
Opening and parsing file: ST-LINK_GDB_server_a11156.srec
File : ST-LINK_GDB_server_a11156.srec
Size : 39248 Bytes
Address : 0x08000000
Erasing memory corresponding to segment 0:
Erasing internal memory sectors [0 4]
Download in Progress:
File download complete
Time elapsed during download operation: 00:00:00.757
Verifying ...
Download verified successfully
Debugger connection lost.
Shutting down...
我刚想出如何解决这个问题,首先我必须re-flash将STM32WB5MMG固件升级到最新版本,然后从https://github.com/STMicroelectronics/STM32CubeWB
刷入BLE_AT_Server_reference.hex
不要使用二进制库中的 BLE_AT_Server.hex,它会禁用 swd 连接,如果你碰巧这样做并且无法再连接到开发板,只需将 stm32programmer 模式更改为 under reset然后按下蓝牙模块的复位按钮并松开,它会让你连接到蓝牙模块并清除程序。
之后我遇到了另一个问题,有时程序会挂在“TX:AT”,为了解决这个问题我必须重置蓝牙模块然后重置主板,或者简单地重置主板和re-plug USB 数据线。
我正在使用来自 STM32CubeIDE 1.7.0 的 BLE_AT_CLIENT 示例,但在 ST BLE SENSOR 应用程序或我的 computer/smartphone 正常蓝牙扫描中未检测到任何内容。我有 2 个 B-U585I-IOT02A,并且都在 teraterm 上给出了完全相同的错误消息。 error message on teraterm
这里还有来自控制台的日志。
STMicroelectronics ST-LINK GDB server. Version 5.9.1
Copyright (c) 2021, STMicroelectronics. All rights reserved.
Starting server with the following options:
Persistent Mode : Disabled
Logging Level : 1
Listen Port Number : 61234
Status Refresh Delay : 15s
Verbose Mode : Disabled
SWD Debug : Enabled
InitWhile : Enabled
Waiting for debugger connection...
Debugger connected
-------------------------------------------------------------------
STM32CubeProgrammer v2.8.0
-------------------------------------------------------------------
ST-LINK SN : 004000204741500320383733
ST-LINK FW : V3J8M3
Board : B-U585I-IOT02A
Voltage : 3.30V
SWD freq : 24000 KHz
Connect mode: Under Reset
Reset mode : Hardware reset
Device ID : 0x482
Revision ID : Rev Z
Reconnecting with the recommended frequency (1000 kHz)!
ST-LINK SN : 004000204741500320383733
ST-LINK FW : V3J8M3
Board : B-U585I-IOT02A
Voltage : 3.30V
SWD freq : 1000 KHz
Connect mode: Under Reset
Reset mode : Hardware reset
Device ID : 0x482
Revision ID : Rev Z
Reconnected with the recommended frequency (3300 kHz)!
Device name : STM32U575/STM32U585
Flash size : 2 MBytes
Device type : MCU
Device CPU : Cortex-M33
BL Version : 0xc0
Debug in Low Power mode enabled
Memory Programming ...
Opening and parsing file: ST-LINK_GDB_server_a11156.srec
File : ST-LINK_GDB_server_a11156.srec
Size : 39248 Bytes
Address : 0x08000000
Erasing memory corresponding to segment 0:
Erasing internal memory sectors [0 4]
Download in Progress:
File download complete
Time elapsed during download operation: 00:00:00.757
Verifying ...
Download verified successfully
Debugger connection lost.
Shutting down...
我刚想出如何解决这个问题,首先我必须re-flash将STM32WB5MMG固件升级到最新版本,然后从https://github.com/STMicroelectronics/STM32CubeWB
刷入BLE_AT_Server_reference.hex不要使用二进制库中的 BLE_AT_Server.hex,它会禁用 swd 连接,如果你碰巧这样做并且无法再连接到开发板,只需将 stm32programmer 模式更改为 under reset然后按下蓝牙模块的复位按钮并松开,它会让你连接到蓝牙模块并清除程序。
之后我遇到了另一个问题,有时程序会挂在“TX:AT”,为了解决这个问题我必须重置蓝牙模块然后重置主板,或者简单地重置主板和re-plug USB 数据线。