Skip to main content
Zoey
Associate III
September 4, 2019
Question

Is it possible to download firmware again after trying out the SBSFU projects?

  • September 4, 2019
  • 2 replies
  • 800 views

I tried the SBSFU examples (did not change any code) on a NUCLEO-L476RG board and it worked fine. Now I can not use STM32CubeProgrammer to connect the board. Is there any way to download a new firmware ( I mean, a firmware to replace the SBSFU firmware) to the board again? So that I can use this board for other projects.

The configuration of the SBSFU is:

/*#define SECBOOT_DISABLE_SECURITY_IPS*/

/*#define SFU_FINAL_SECURE_LOCK_ENABLE */

#define SFU_DEBUG_MODE

/*#define SFU_FWIMG_BLOCK_ON_ABNORMAL_ERRORS_MODE*/

#define SECBOOT_OB_DEV_MODE

Thanks!

This topic has been closed for replies.

2 replies

Jocelyn RICARD
ST Employee
September 4, 2019

Hello Zoey,

by default, the SBSFU will apply all the protections available.

One of these protections is the RDP level 1 (as long as you didn't uncomment the final secure lock enable).

Also, the GPIOs used for the SWD connection were set to another alternate function.

With the Readout Protection level, you can still attach to the target but you need to set the mode to "Under reset" in the Cube programmer.

Once connected, go to option bytes and set RDP level to 0xAA (RDP level 0)

This will provoke a mass erase and take you back to a clean device.

Another way would be to set the BOOT0 pin to 1 and to connect to the system bootloader through DFU or USART.

The STM32CubeProgrammer is able to handle these communication links and will allow you to do the RDP regression.

Best regards

Jocelyn

Zoey
ZoeyAuthor
Associate III
September 9, 2019

Thanks very much, Jocelyn.

I tried to set the mode to "Under reset" in the Cube programmer and with different reset modes (software reset, hardware reset, core reset), it failed to connect and showed the following messages

16:45:52 : STM32CubeProgrammer API v2.1.0

16:45:52 : ST-LINK error (DEV_CONNECT_ERR)

16:46:25 : ST-LINK error (DEV_USB_COMM_ERR)

16:46:25 : Error: Problem occured while trying to connect

16:46:53 : ST-LINK error (DEV_USB_COMM_ERR)

16:46:53 : Error: Problem occured while trying to connect

16:47:06 : ST-LINK error (DEV_USB_COMM_ERR)

16:47:06 : Error: Problem occured while trying to connect

I will try the second way and see.

Jocelyn RICARD
ST Employee
September 10, 2019

Hello Zoey,

One first thing to do would be to update the stlink firmware.

When connected with STM32CubeProgrammer click on firmware upgrade button and follow instructions

Then please launch the following command:

STM32_Programmer_CLI.exe -c port=SWD -ob displ

and just copy paste here the option byte contents.

I will have a look and tell you what to do.

Best regards

Jocelyn