Hello,
I'm wondering what would be a good way to organize a failsafe firmware update, possibly using 1 mcu only.
The idea - a TIVA mcu receives the firmware file over bluetooth and stores it in some external flash. Then I need to somehow put that file into the mcu - as the firmware.
I read the available docs - bootloader pdf and some application notes... From what I understand, I'll need to do that over some serial connection such as UART. I don't have USB.
I can imagine how this would work using another mcu that only handles the firmware update (please correct me if I'm wrong):
1) on the main mcu (the one being updated) I run ROM_UpdateUART() and it goes into update mode
2) the second mcu starts sending the firmware from flash to the main mcu's bootloader. I see there's an example code of sflash.exe application that handles the update protocol. So probably I should reuse that - and port it to the second mcu?
This way (with 2 mcus) even if power is interrupted during the update - the secondary mcu will be able to retry the update next time. So this should be safe.
However I'd like to implement that using a single mcu only. Would that be possible?
I don't understand when the main mcu goes into ROM_UpdateUART() mode - who will send the file to it? Or perhaps in this case ROM_UpdateUART() shouldn't be used?
Does it make sense to modify the bootloader to do the copy from the external flash - wouldn't it be easier this way?
Any tips and advices on this matter will be much appreciated.
Thanks!