zephyr: boot_write_img_confirmed not working on stm32g474ce
Describe the bug After updating the firmware with mcuboot and dfu-util the firmware will start after swapping the images. But it gets Error -5 on confirming the image.
I am using a custom board with stm32g474ce.
Expected behavior confirming the new running image should work as expected.
Impact can not update my firmware after deployment of hardware.
Logs and console output With CONFIG_FLASH_LOG_LEVEL_DBG=y i will get the following output:
[00:00:03.030,000] <dbg> flash_stm32: flash_stm32_read: Read offset: 311280, len: 16
[00:00:03.030,000] <dbg> flash_stm32: flash_stm32_read: Read offset: 311256, len: 1
[00:00:03.030,000] <dbg> flash_stm32: flash_stm32_read: Read offset: 311264, len: 1
[00:00:03.030,000] <dbg> flash_stm32: flash_stm32_read: Read offset: 311272, len: 1
[00:00:03.030,000] <inf> main: Confirming Boot Image
[00:00:03.030,000] <dbg> flash_stm32: flash_stm32_read: Read offset: 311280, len: 16
[00:00:03.030,000] <dbg> flash_stm32: flash_stm32_read: Read offset: 311256, len: 1
[00:00:03.030,000] <dbg> flash_stm32: flash_stm32_read: Read offset: 311264, len: 1
[00:00:03.030,000] <dbg> flash_stm32: flash_stm32_read: Read offset: 311272, len: 1
[00:00:03.030,000] <dbg> flash_stm32: flash_stm32_write: Write offset: 311272, len: 8
[00:00:03.030,000] <dbg> flash_stm32: flash_stm32_write_protection: Disable write protection
[00:00:03.030,000] <dbg> flash_stm32: flash_stm32_check_status: Status: 0x000000c0
[00:00:03.030,000] <dbg> flash_stm32: flash_stm32_write_protection: Enable write protection
Version: 3.4.0 Git Commit: cb3ae1779f7c814b72df298a41a8b0bc68500ba5
About this issue
- Original URL
- State: closed
- Created 10 months ago
- Comments: 16 (5 by maintainers)
no it is not needed anymore. They have a new swap algorithm which does not wear out the flash at the scratch partition.