User application firmware update failing after 65536 bytes written - EFR32MG12
01/25/2018 | 01:16 AM
I am implementing DFU capabilities on an EFR32MG12. I am following the steps in section 4 of AN1086 - Gecko Bootloader Bluetooth. I tried both internal and external flash bootloader setups and pre compiled bootloader images as well as my own images. For whatever reason, I get error 0x403 when trying to write 65536 bytes to flash using bootloader_writeStorage. I am writing bytes received from UART in 64 byte chunks. My code almost exactly follows the example shown in the appendix of AN1086, though I am using a UART instead of Bluetooth to communicate the image to the EFR32.
Any insight as to why it's consistently failing at byte 65536?
EFR32MG12P132F1024GL125
Discussion Forums
Gecko
32-bit MCUs
Answered
Answered
The only reason I could think of is that the variable used for flash offset is uint16 and it wraps around at 65536. The write offset needs to be a 32-bit variable. Can you check this?
Correct Answer
0
That was exactly it. Rookie mistake. Thanks, Jaakko!
User application firmware update failing after 65536 bytes written - EFR32MG12
I am implementing DFU capabilities on an EFR32MG12. I am following the steps in section 4 of AN1086 - Gecko Bootloader Bluetooth. I tried both internal and external flash bootloader setups and pre compiled bootloader images as well as my own images. For whatever reason, I get error 0x403 when trying to write 65536 bytes to flash using bootloader_writeStorage. I am writing bytes received from UART in 64 byte chunks. My code almost exactly follows the example shown in the appendix of AN1086, though I am using a UART instead of Bluetooth to communicate the image to the EFR32.
Any insight as to why it's consistently failing at byte 65536?