cancel
Showing results for 
Search instead for 
Did you mean: 

BLUENRG-M2SP SWD connection to STLINK-V3PWR

AOdonde
Associate

I currently have a BLUENRG-M2SP connected via SWD to my STLink-V3PWR.
The issue is while my flasher can connect to the device it then cannot read the bootloader sector or flash the address memory.

Here is the log:

16:34:35.247: Waiting device to read bootloader (device connected by ST-Link) ->Device Connected
16:34:35.437: Device Identification -> BlueNRG-2
16:34:35.620: Read Bootloader Sector -> FAILED
16:34:36.038: Device Disconnection -> SUCCESS

My set up is:

  • PSU supplying the board with 3V9.
  • STLink-V3PWR
  • BLUENRG-M2SP
  • Four wires connected from the board to the programmer
    • SWDIO
    • SWCLK
    • Vin
    • Gnd

In addition to this, I also have the boot pin connected to another PSU that would supply it with 3V6. I heard/read via the datasheet that at times it is neccessary to force the boot pin high. This forces the chip to go into the bootloader and ensuring that the SWD debug pins are open for connection.

So I have three questions.

  1. Any insight as to why I would be able to establish a connection but not be allowed to read/write?
  2. What is the proper utilisation of the Boot Pin, I currently attach the pin to 3V6 when the board itself is powered on.
  3. Is it worth me trying to program the device via UART instead? and is that something that is possible out of the box?

Cheers for the feedback.

 

1 ACCEPTED SOLUTION

Accepted Solutions
AOdonde
Associate

FYI
I have solved the problem.
Here is the fix just in case it helps anyone in the future.

  1. Make sure you are using the right flasher for your debugger. Since I am using the STLink-V3PWR I am using STSW-BNRGFLASHER coupled with it. (So you might want to try different flasher if you are having issues)
  2. Also the boot pin needs to be set high before you turn the module itself on, and not at the same time.

I have attached my setup below incase it helps.

View solution in original post

1 REPLY 1
AOdonde
Associate

FYI
I have solved the problem.
Here is the fix just in case it helps anyone in the future.

  1. Make sure you are using the right flasher for your debugger. Since I am using the STLink-V3PWR I am using STSW-BNRGFLASHER coupled with it. (So you might want to try different flasher if you are having issues)
  2. Also the boot pin needs to be set high before you turn the module itself on, and not at the same time.

I have attached my setup below incase it helps.