Lora-e5 mini , I cannot not erase, write or change OB to the flash ? Whereas I removed RDP from 0xBB level 1 to 0xAA level 0

I have successfully removed RDP from 0xBB level 1 to 0xAA level 0, but I cannot not erase, write or change options bytes to the flash ?
it says for example for erase :
Sector erase operation failed . Please verify flash memory protection

I have no problem connection stlink v2 to the board and read the flash or OB.

I tested on 2 boards …

Thank you for your help, my project is stopped with lora-e5 :frowning:

Laurent

Hi,
Sorry for the late reply. Would you please send us a screenshot of your STM32CubeProgrammer when the issue happens?

Thanks,
Jerry

Hello,

Thank you for your help, I have 2 boards and same problem on both :
There is the log when I erase and their is a picture of the stm32cube erasing.
Reading configuration bytes is ok and RDP is set to 0xAA.

V target is 3.16V

stlink v2 firmware : V3j37S7

Masse erase output :

10:15:43:555 : MASS ERASE …

10:15:43:555 : Flash erase…

10:15:43:558 : halt ap 0

10:15:43:558 : w ap 0 reg 15 PC (0x20000000)

10:15:43:559 : w ap 0 reg 17 MSP (0x20000500)

10:15:43:561 : w ap 0 reg 16 xPSR (0x01000000)

10:15:43:568 : w ap 0 @0x20001380 0x00000200 bytes Data 0x00000000

10:15:43:568 : w ap 0 @0x20000000 0x00000004 bytes Data 0x0000BE00

10:15:43:607 : w ap 0 @0x20000004 0x00000F54 bytes Data 0x0001B510

10:15:43:607 : Init flashloader…

10:15:43:609 : halt ap 0

10:15:43:610 : w ap 0 reg 0 R0 0x00000001

10:15:43:610 : w ap 0 reg 1 R1 0x00000000

10:15:43:610 : Loader mass erase…

10:15:43:610 : Error: Mass erase operation failed.Please verify flash protection

Page erase output :

10:16:50:708 : Flash sector erase …

10:16:50:710 : Flash erase…

10:16:50:712 : halt ap 0

10:16:50:712 : w ap 0 reg 15 PC (0x20000000)

10:16:50:713 : w ap 0 reg 17 MSP (0x20000500)

10:16:50:714 : w ap 0 reg 16 xPSR (0x01000000)

10:16:50:724 : w ap 0 @0x20001380 0x00000200 bytes Data 0x00000000

10:16:50:724 : w ap 0 @0x20000000 0x00000004 bytes Data 0x0000BE00

10:16:50:763 : w ap 0 @0x20000004 0x00000F54 bytes Data 0x0001B510

10:16:50:764 : Init flashloader…

10:16:50:766 : halt ap 0

10:16:50:767 : w ap 0 reg 0 R0 0x00000001

10:16:50:768 : w ap 0 reg 1 R1 0x00000000

10:16:50:769 : w ap 0 reg 2 R2 0x00000000

10:16:50:769 : w ap 0 reg 3 R3 0x00000000

10:16:50:770 : w ap 0 reg 4 R4 0x00000000

10:16:50:772 : w ap 0 reg 5 R5 0x00000000

10:16:50:773 : w ap 0 reg 6 R6 0x00000000

10:16:50:774 : w ap 0 reg 7 R7 0x00000000

10:16:50:774 : w ap 0 reg 8 R8 0x00000000

10:16:50:774 : w ap 0 reg 9 R9 0x00000000

10:16:50:774 : w ap 0 reg 10 R10 0x00000000

10:16:50:775 : w ap 0 reg 11 R11 0x00000000

10:16:50:776 : w ap 0 reg 12 R12 0x00000000

10:16:50:776 : w ap 0 reg 13 SP 0x00000000

10:16:50:777 : w ap 0 reg 14 LR 0x20000001

10:16:50:778 : w ap 0 reg 15 PC 0x2000002F

10:16:50:779 : w ap 0 reg 16 xPSR 0x01000000

10:16:50:780 : w ap 0 reg 17 MSP 0x20001354

10:16:50:780 : w ap 0 reg 18 PSP 0x00000000

10:16:50:780 : run ap 0

10:16:50:780 : halt ap 0

10:16:50:781 : r ap 0 reg 0 R0 0x00000001

10:16:50:781 : Loader sector erase…

10:16:50:784 : w ap 0 reg 0 R0 0x08000000

10:16:50:785 : w ap 0 reg 1 R1 0x08000000

10:16:50:785 : w ap 0 reg 2 R2 0x00000002

10:16:50:786 : w ap 0 reg 3 R3 0x00000000

10:16:50:786 : w ap 0 reg 4 R4 0x00000000

10:16:50:786 : Error: Sector erase operation has failed at least for one of the existing specified sectors.Please verify flash memory protection.

I solved the problem :

RDB was locked at 0xAA and still no erase or flash capability, you need to set again RDP to 0xBB , unplug the board (very important, if not it will not work and stay locked at 0xAA), reconnect to the stm32, you will see RDP with a strange value 0xFF, that is ok, and set back RDP to 0xAA, this time you will be able to change the value.

Today all is ok, I can erase and flash anything :slight_smile: very very very strange …

Thanks for updating. Have you tried full chip erase with another board?