Skip to main content
Roadrunner1805
Associate III
July 7, 2023
Question

Readout Protection

  • July 7, 2023
  • 2 replies
  • 3194 views

Hello,

is it possible to enable/disable the "readout protection via SWD/JTAG mode for BlueNRG devices? Is it possible with openocd?

BR Sebastian

This topic has been closed for replies.

2 replies

Peter BENSCH
Technical Moderator
July 7, 2023

Readout Protection is used to protect the flash from being read out. Deactivating it therefore only makes sense if the flash is completely deleted.
This is why it is written in the data sheets or the reference manual: Disable readout protection: Perform a mass erase of the user flash.

OpenOCD: TN1347, section 6.3 describes the settings and usage together with the RF-Flasher utility.

Does it answer your questions?

Regards
/Peter

Roadrunner1805
Associate III
July 7, 2023

Not just yet. Is there a command for openocd to enable the "readout protection"? Or for the RF-Flasher command line?

BR Sebastian

Peter BENSCH
Technical Moderator
July 7, 2023

Well, not really a command but depending on the particular device some data you have to write to a special location. Details can be found in the data sheet or reference manual, if you search for “readout protection”.

Winfred LU
ST Employee
July 10, 2023

To the qeustion: yes for BlueNRG-1/2, partially yes for BlueNRG-LP.

Perform the actions according to your needs.

 

For BlueNRG-1/2, both can be done via SWD/openocd:

  • Enable: Program a secret 64 bit sequence in the last two word address of the user flash.
  • Disable: Perform a mass erase

For BlueNRG-LP, readout protection can be disabled via SWD/openocd

  • Enable: this has to be enabled by passing a command (0x82) to UART bootloader. Refer to AN5471.
  • Disable: perform a mass erase.

 

AN5471: The BlueNRG-LP, BlueNRG-LPS UART bootloader protocol

 

 

 

Roadrunner1805
Associate III
July 10, 2023

Thanks.

I got it working with the RF-Flasher Launcher.

I also got it to run passing the command to UART. But how should it work in SWD mode and openocd?