[STM32H753ZIT6]: ERROR common_flash.c: Failed to unlock flash option! #1401
Labels
bug/fixed
component/st-flash
programmer/STLINK/V3
V3SET / V3MODS / V3MINI / V3MINIE / V3E / V3EC
status/resolved
target/stm32h7
Milestone
Commandline output:
`sl->flash_type: 0x00000008
unlock - optkey_reg: 0x52002008
unlock - optkey2_reg: 0x52002108
unlock - optkey1: 0x08192A3B
unlock - optkey2: 0x4C5D6E7F
stlink_write_debug32: 0x08192a3b to 0x52002008
Error Checking the command execution status stored in the first byte of the response, cmd:WRITEDEBUGREG error rxbuf[0]:(0x19)
size: -1
stlink_write_debug32 result: -1
stlink_write_debug32: 0x4c5d6e7f to 0x52002008
Error Checking the command execution status stored in the first byte of the response, cmd:WRITEDEBUGREG error rxbuf[0]:(0x19)
size: -1
stlink_write_debug32 result2: -1
is locked ? 1
stlink_write_debug32: 0x08192a3b to 0x52002108
Error Checking the command execution status stored in the first byte of the response, cmd:WRITEDEBUGREG error rxbuf[0]:(0x19)
size: -1
stlink_write_debug32: 0x4c5d6e7f to 0x52002108
Error Checking the command execution status stored in the first byte of the response, cmd:WRITEDEBUGREG error rxbuf[0]:(0x19)
size: -1
2024-06-05T18:10:23 ERROR common_flash.c: Failed to unlock flash option!
2024-06-05T18:10:23 ERROR option_bytes.c: Flash option unlock failed!`
Expected/description:
I can flash my STM32H753 but not the option bytes.
The unlock of the flash works but not the unlock of the flash option.
I can read and write my STM32H753 using STM32CubeProgrammer.
In the function send_recv() from usb.c, I don't know what the error code 0x19 on rxbuf[0] is about, this code error is not handled by the source project.
I modified the source code to only add some printf() for debug purpose.
I also try with STLink V2 the unlock flash option still not work but error code not the same: 0x15 (STLINK_DEBUG_ERR_DP_FAULT) for the first key and 0x11 (STLINK_DEBUG_ERR_AP_FAULT) for the second key
The text was updated successfully, but these errors were encountered: