Skip to main content
Associate III
April 8, 2024
Solved

How to erase STM32WLE5JC and over write write protected firmware

  • April 8, 2024
  • 1 reply
  • 1680 views

How to erase STM32WLE5JC so that I can put my binary in the Seeed Studio Wio-E5 module.  Web says changing the lock bit from hex value of ??? to ???.  Where can I set it?  TIA

David__0-1712540587542.png

 

Best answer by Danish1

According to https://wiki.seeedstudio.com/LoRa_E5_mini/#21-erase-factory-at-firmware you need to link the PB13/SPI_SCK/BOOT pin to Vss prior to applying power so that the pre-programmed firmware enters its "boot" mode, at which point it will start pumping out 'C' characters on the USART at 9600 baud (rather than expecting AT commands on that port).

After that you can remove code protection it using the JTAG RST, SWDIO and SWCLK pins. So you will need a JTAG interface. Sorry I can't help you on how to do it with Stm32cubeIDE; I don't use it. (I prefer the commercial, paid-for, Rowley Crossworks).

But. You are at the mercy of Seeed and rely on them including this boot mode, and only using RDP level 1. Who knows if they will continue to do so in future.

1 reply

Danish1
Danish1Best answer
Lead III
April 8, 2024

According to https://wiki.seeedstudio.com/LoRa_E5_mini/#21-erase-factory-at-firmware you need to link the PB13/SPI_SCK/BOOT pin to Vss prior to applying power so that the pre-programmed firmware enters its "boot" mode, at which point it will start pumping out 'C' characters on the USART at 9600 baud (rather than expecting AT commands on that port).

After that you can remove code protection it using the JTAG RST, SWDIO and SWCLK pins. So you will need a JTAG interface. Sorry I can't help you on how to do it with Stm32cubeIDE; I don't use it. (I prefer the commercial, paid-for, Rowley Crossworks).

But. You are at the mercy of Seeed and rely on them including this boot mode, and only using RDP level 1. Who knows if they will continue to do so in future.

David_Author
Associate III
April 8, 2024

From ST Youtube, connect ST LINK, open STM32CubeProgrammer.  Connect, click OB on left.  The RDP is displayed.  Below is tested on Nueclo STM32F401RE, AA is open, BB prevvents reading of flash.  BB can change back to AA with auto erase flash. CC is permanant lock.  Cannot change back to AA and CANNOT write new code to flash

 

David__0-1712586746285.png

 

Explorer
October 11, 2024

Thanks. This really Helped!