Question
STM32H735IGK6U st-flash erase problem
I am trying to flash a STM32H735IGK6U using st-flash:
st-flash --debug --reset write $(RSLT).bin 0x8000000
I get below error here and there, What causes this? If I do st-flash reset and then st-flash erase it works fine again.
- Programmer/board type: Stlink-V3
- Operating system: Ubuntu 22.04
- stlink version: v1.8.0
- stlink commandline tool name: st-flash
2024-06-06T13:19:02 DEBUG common.c: *** stlink_write_debug32 0x00000031 to 0x5200200c
2024-06-06T13:19:02 DEBUG common.c: *** stlink_read_debug32 0x00050000 at 0x52002010
2024-06-06T13:19:02 ERROR common.c: Flash programming error: 0x00040000
2024-06-06T13:19:02 ERROR common.c: Failed to erase_flash_page(0x8000000) == -1
2024-06-06T13:19:02 DEBUG common.c: *** stlink_read_debug32 0xffffffff at 0x08000000
2024-06-06T13:19:02 DEBUG common.c: *** stlink_write_reg
2024-06-06T13:19:02 DEBUG common.c: data_len = 2 0x2
0d 00
2024-06-06T13:19:02 DEBUG common.c: *** stlink_read_debug32 0xffffffff at 0x08000004
2024-06-06T13:19:02 DEBUG common.c: *** stlink_write_reg
2024-06-06T13:19:02 DEBUG common.c: data_len = 2 0x2
80 00
2024-06-06T13:19:02 DEBUG common.c: *** stlink_run ***
2024-06-06T13:19:02 DEBUG common.c: *** stlink_read_reg
2024-06-06T13:19:02 DEBUG common.c: (16) ***
2024-06-06T13:19:02 DEBUG common.c: data_len = 8 0x8
80 00 00 00 03 00 00 21
2024-06-06T13:19:02 DEBUG usb.c: r_idx (16) = 0x21000003
stlink_fwrite_flash() == -1
2024-06-06T13:19:02 DEBUG common.c: *** stlink_exit_debug_mode ***
2024-06-06T13:19:02 DEBUG common.c: *** stlink_write_debug32 0xa05f0000 to 0xe000edf0
2024-06-06T13:19:02 DEBUG common.c: *** stlink_close ***
Going through st-link GitHub issues, but want to check things for the board as well.
