cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot connect to BlueNRG M2SP with BlueNRG ST link utility SWD after upgrading firmware

BPaik
Senior

Using AN5651 Update procedure and configuration in DTM firmware for X-NUCLEO-BNRG2A1, I upgraded the firmware image to the latest stack image. I connected the ST link V2 and flashed the "BLUENRG-M2SP_DTM_SPI.hex" file with the BlueNRG ST link utility. After the device was flashed successfully, the ST link V2 lost connection to the device and could no longer connect to the target. The SWD settings are the same as before: 100kHz, low power mode enabled, etc. I have tried restarting the application, power cycling the board, and trying different SWD frequencies, but nothing seems to work.

The interesting thing is that the M2SP is fully functional. The BLE application on my main nucleo board still functions with the BNRG2A1 as before, so I know that the new FW was flashed correctly. In fact, I verified the reported FW version from the M2SP had changed to the new version number when debugging my nucleo board application. It seems that the new FW image I flashed has somehow disabled SWD.

1 ACCEPTED SOLUTION

Accepted Solutions
Winfred LU
ST Employee

It is because the firmware application disables SWD pins or sets the device in sleep or standby state, in which SWD port is not powered.

To recover this situation, it is recommended to force DIO7/BOOT pin high and hardware reset the device in order to force execution of the bootloader. The user

can then connect with SWD interface and erase the device Flash memory.

View solution in original post

4 REPLIES 4
Winfred LU
ST Employee

It is because the firmware application disables SWD pins or sets the device in sleep or standby state, in which SWD port is not powered.

To recover this situation, it is recommended to force DIO7/BOOT pin high and hardware reset the device in order to force execution of the bootloader. The user

can then connect with SWD interface and erase the device Flash memory.

joshua.cowpland
Associate II

Did you ever get this working? I too have purchased a BlueNRG-M2SP module and installed on my own PCB and am trying to run some projects on it. I can program via ST-LINK using Atollic with the projects from the SDK, but nothing seems to be working. As far as I can tell, the projects seem to be targeted at the EVAL boards.

It sounds like your issue is different than mine. I was having trouble with SWD. Winfred's answer about holding the boot pin worked for me. The eval board projects are built for the L4 microcontroller, so if you are using a different MCU or have a different pinout I don't think it will work. You would have to modify the source code to match your MCU and layout.​

Please create a new thread for a different question.

What did you mean for "nothing seems to be working"? SWD port not working or the flash project not working?