Skip to main content
RArch
Associate II
June 20, 2021
Solved

Problems programming BLUENRG2

  • June 20, 2021
  • 1 reply
  • 1168 views

I'm hoping to build a project with a BLUENRG2 using a BLUENRG-M2 module. I purchased an X-NUCLEO-BNRG2A1 board to get started and jumped the SWDIO, SWDCLK, NRESET, VDD and GROUND pins on this board to my STLINK-V2. Initially I could connect to the module, I ran the GPIO Toggle example from the SDK modified to run the LED on the board and validated everything was happy. After that, I erased the board and reprogrammed it with the Beacon example from the SDK and now I can no longer connect to the chip via SWD, using Keil or with the BLUENRG Flasher utility. In either case, I can see the STLINK but it will not detect the chip. I can see activity on the SWD CLK/IO lines with a scope, but it only lasts for a short period and then I get the can't-connect message.

I've validated that my STLINK still works to program an STM32 chip. The BLUENRG is still plugging along sending beacon packets every 100mS, but I can't connect to it to erase/reprogram the FLASH. The BOOT pin is pulled down to ground via 10k resistor on the BNRG2A1 board.

I'm stumped here. Either I somehow fried the SWD interface on the BLUENRG or I'm missing something else entirely. My next steps are to retrieve my FTDI module from work tomorrow and try to reprogram via the serial boot loader, but I thought it worthwhile to ask here if I'm missing something obvious. Any suggestions much appreciated!

Cheers,

Roger

    This topic has been closed for replies.
    Best answer by Winfred LU

    There are situations where SWD access is disabled:

    • The application that disables debug pins
    • The application that sets the device in sleep or standby state, in which the debug port is not powered

    Please try to force BOOT (IO7) pin high and hardware reset to cause the execution of the bootloader code. Then you can then connect with SWD interface and erase the device Flash memory.

    --

    To flash via bootloader will work as well.

    1 reply

    Winfred LU
    Winfred LUBest answer
    ST Employee
    June 21, 2021

    There are situations where SWD access is disabled:

    • The application that disables debug pins
    • The application that sets the device in sleep or standby state, in which the debug port is not powered

    Please try to force BOOT (IO7) pin high and hardware reset to cause the execution of the bootloader code. Then you can then connect with SWD interface and erase the device Flash memory.

    --

    To flash via bootloader will work as well.

    RArch
    RArchAuthor
    Associate II
    June 21, 2021

    Thank you Winfred, I was able to reflash the module after following your advice.

    Thanks again!

    Roger