2022-04-20 04:41 PM
Hi everyone,
I'm implementing the USART Bootloader Protocol that is described in the AN3155 document and also using the AN2606 document to get all the information needed. As described in the section 4.6 (Programming Constraints) and in the Table 7 (see image attached) of AN2606, the memory alignment for STM32G03xxx/04xxx device should be 4 bytes but for some reason when I try to do the Write Memory command on the example memory address of 4 bytes alignment (0x08000014) the data is not getting written into that memory address. I even received back an ACK byte but when reading to that address to check if the data is there I see that the memory data has not changed. However, when I write data at the example memory address of 8 bytes alignment (0x08000010) I'm able to successfully write data to that address and confirm it by reading that address. I have double checked the product ID (0x466) by the running the GET ID command, also checked the bootloader version (0x31), I have tried write to different addresses using both 4 bytes and 8 bytes alignment and the only ones that I'm able to really write successfully is the 8 bytes alignment memory addresses. My questions are: I'm doing something wrong? There is a setting somewhere that I didn't changed? This is a known issue? How can I confirm that the 8 bytes memory alignment on this chip is true?
Thanks for any responses.
Solved! Go to Solution.
2022-04-20 05:34 PM
You must write in 8 byte increments when programming the flash on STM32G0X0, per the RM. Presumably the table should show 8 bytes and not 4.
2022-04-20 05:34 PM
You must write in 8 byte increments when programming the flash on STM32G0X0, per the RM. Presumably the table should show 8 bytes and not 4.
2022-04-20 05:46 PM
Thanks a lot for the quick answer!!