cancel
Showing results for 
Search instead for 
Did you mean: 

BlueNRG-2 (BlueNRG-M2SA) programming of flags

QuackerShoe
Associate II

Hello we have a BlueNRG-M2SA based design and we are debugging using an STLink/V3 (we have the STLink-V3 Set). This works most of the times (J-Link is working better). Now, one of the devices is read protected and we can not get it to debug anymore. How can we set the readprotect flags? It seems that STCubeProgrammer does not support BlueNRG devices at all (only via Uart) and the provided BlueNRG-X Flasher utility can not set flags.

How to have deep access to the BlueNRG device?

5 REPLIES 5
Winfred LU
ST Employee

Please use either ST-Link V2 or J-Link instead of ST-Link V3, since STLink V3 is known to have issue with BlueNRG-1/2.

Performing a mass erase of flash will disable the readout protection.

To enable the readout protection:

Program a secret 64 bit sequence in the last two word address of the user flash. The secret 64 bit sequence can be anything different from 0xFFFFFFFF, 0xFFFFFFFF

QuackerShoe
Associate II

Hi Winfried

Thanks for the input. I managed to wipe the device and it works again. I used BCN002V1D for a mass erase.

Maybe it would be worthwile to update the datasheet of the BlueNRG devices to mention that ST-Link V3 is known to have issues? Can you provide a link to further information on this issue? I mean we only bought the ST-Link V3 because it explicitely is mentioned in the datasheet to use this debugger (e.g. in the BlueNRG-Tile DevKit). What is the recommended IDE to work with BlueNRG devices (I assume CubeIDE does not work, this is why we are stuck with TrueSTUDIO) - is there any plan for ST to support their BlueNRG devices in the latest development ecosphere (CubeIDE, Programmer, etc.) or do you drop BlueNRG series and wait for customers to use Nordic devices instead?

QuackerShoe
Associate II

By the Way in this anwer: https://community.st.com/s/question/0D53W00000O0JFrSAN/how-to-program-stevalbcn002v1b

Elon @Eleon BORLINI​ even states that STLink-V3 and STM32 CubeProgammer is to be used... very confusing.

Hi @QuackerShoe​ ,

that's what I was told by the tool developers.

I suggested also STLINK V2, not stated that STLink-V3 was mandatory.

-Eleon

Good to know that the device works again for you.

We saw people having issues to use ST-Link V3 with BlueNRG-1/2, but actually i have no idea what exactly the issue is. Sorry that i do not have a ST-Link V3 device to replicate the issue either.

So the suggestion was based on my limited understanding: if ST-Link V3 works for you properly, use it. If it doesn't, to use V2 instead can be the quickest way.

Alternately, we may help to forward the issue to the team that maintain ST-Link V3 and utilities.

After all, personally i think ST-Link V3 shall work with BlueNRG series of SoCs as well. If there is an issue, it needs to be fixed.

Regarding to the IDE, the most popular IDEs including IAR EWARM and Keil MDK-ARM are both supported.

In case a free IDE is needed, TrueSTUDIO will do the job as you knew.

Besides, please take a look at WiSE-STUDIO, which is a Eclipse based IDE, with GCC toolchain:

https://www.st.com/content/st_com/en/products/embedded-software/wireless-connectivity-software/stsw-wise-studio.html

I believe that we will not drop BlueNRG series. As an evidence, the BlueNRG chips are all part of ST’s 10-year longevity program, including BlueNRG-1, BlueNRG-2, BlueNRG-2N, BlueNRG-LP, BlueNRG-M0, BlueNRG-M2, and BlueNRG-MS.

https://www.st.com/content/st_com/en/about/quality-and-reliability/product-longevity.html#10-year-longevity