2021-06-23 06:42 AM
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?
2021-06-23 07:08 AM
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
2021-06-24 06:10 AM
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?
2021-06-24 06:14 AM
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.
2021-06-24 06:25 AM
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
2021-06-24 08:34 AM
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:
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.