2021-01-12 02:24 AM
Hi everyone,
My question is what do I have to do ?
I read too much information about IAP to really understand what do I need to do.
Our firmware is working great for now, we want to update the firmware without stop everything and on restart we can be in the newer firmware. The image "On the fly.png" shows our procedure.
During the upload process, we get the byte through the UART (parsed because of our protocol) and put these data in the FLASH (actually it works for put / read data at address 0x08100000), "Memory map.png".
I want to do it really simple :
So my idea was to :
But I read some about VECTOR_TABLE and in the AN2606 there is the conditional "first address of Bank2 is within int. SRAM address".
I do not really get this information.
Could you help me on that ? The procedure I imagine is compatible with the upload process ?
In case of update of the update, go to firmware version +1.1.1 from version 1.1.0, how did it go with this procedure ? We also write in the Bank 2 ?
Thanks,
Simon
Edit : I also need to know what file I have to upload if I want to write it directly in FLASH ? .bin / .hex / .srec / .elf
I think it is the .bin file but it seems very small (81 kBytes) also the .hex (226 kBytes).
Solved! Go to Solution.
2021-01-15 03:29 AM
Hi everyone,
So I made it work, but I missed some information because I encountered some unexpected results.
BFB2 is swapped 0 to 1, following the number of re-programming.
I always program from address 0x08100000 which is unexpected because I thought 0x08100000 was only the BANK2 and with the software STM32 ST-LINK I saw when I swich BFB it is swapping the BANK1 <-> BANK2 addresses. I thought it was because of FB_MODE that I wrote before. But it didn't change.
So for now :
I need now to add Write Protection to the Bank containing the current application code.
Hope it can be used by others.
Website that helps me : Github guy
Simon
2021-01-15 03:29 AM
Hi everyone,
So I made it work, but I missed some information because I encountered some unexpected results.
BFB2 is swapped 0 to 1, following the number of re-programming.
I always program from address 0x08100000 which is unexpected because I thought 0x08100000 was only the BANK2 and with the software STM32 ST-LINK I saw when I swich BFB it is swapping the BANK1 <-> BANK2 addresses. I thought it was because of FB_MODE that I wrote before. But it didn't change.
So for now :
I need now to add Write Protection to the Bank containing the current application code.
Hope it can be used by others.
Website that helps me : Github guy
Simon
2021-02-01 11:23 PM
Hi everyone,
So I found the problem, it enabled the bank swapping (FB_MODE was forced to '1').
To solve this issue, I called the HAL function HAL_DisableMemorySwappingBank();
Simon