Hello all,
Currently i'm developing a ROM-based bootloader using UART0 on the TM4C123 processor. So far, i have managed to update the firmware using a script i developed in Python. However i have seen that sometimes when i cut the power (intentionally) during the update process, i'm not able to continue the update from where it left and i have to re-program the device using the LM Flash Programmer.
It seems that the device locks up after the DOWNLOAD_COMMAND is sent and remains locked until the update process finishes (which is totally understandable to me). Nevertheless, i'm still struggling on how to recover the update process either from where it left or start the whole update from the very beginning. Also, when the update process starts i have put as APP_START_ADDRESS the 0x0000 and as far as i know, starting from this address will erase the entire flash. Thus, if something happens after sending the DOWNLOAD_COMMAND, then the target device is 'bricked' and i cannot reprogram it using the script i developed but only with LM Flash Programmer using ICDI interface.
So, my main question is how can i recover the UART communication with the target device and instruct the bootloader to continue or restart the update process? The situation of power or any other failure during remote update process could be 'catastrophic' (depending on the application), so i'm trying to figure out how i can put the device into 'recovery' mode and start over with the update process.
Thank you in advance for your help (and sorry in advance if i couldn't communicate my issue completely, i will try my best to give more explanation if needed :) )