This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi,
I was asked to make a program where the main application resides in an OSPI flash and the custumer uses UART communication for fimware update.
From hereafter i will refer to the OSPI bootloader example provided by AM243x MCU+SDK as OSPI boot.
The two possible solutions that came up to my mind are:
A) At startup the ROM is in OSPI bootloader mode.
The main program is loaded using OSPI boot.
The program constanly listens to the UART port for a firwmare update.
B) At startup the ROM is in OSPI bootloader mode.
The OSPI boot(1) loads a custom made bootloader that listens for any update from the UART for a few seconds.
If no communication starts a second OSPI bootl(2) loads the main program.
(if a new firmware is being loaded via UART no timeout will occur and the second OSPI boot(2) will load the newly flashed firmware).
I am new to bootloaders so here's what I'm asking you experts:
I already checked mcu_plus_sdk_am243x_08_03_00_18/docs/api_guide_am243x/BOOTFLOW_GUIDE.html but couldn't find a way of making solution A) or B)
Hi Andrea Favero,
We have an example of SBL_UART (https://software-dl.ti.com/mcu-plus-sdk/esd/AM243X/08_05_00_24/exports/docs/api_guide_am243x/EXAMPLES_DRIVERS_SBL_UART.html) and SBL_UART_UNIFLASH (https://software-dl.ti.com/mcu-plus-sdk/esd/AM243X/08_05_00_24/exports/docs/api_guide_am243x/EXAMPLES_DRIVERS_SBL_UART_UNIFLASH.html)
You can flash the SBL built from SBL UART into the OSPI flash and use the https://software-dl.ti.com/mcu-plus-sdk/esd/AM243X/08_05_00_24/exports/docs/api_guide_am243x/TOOLS_BOOT.html#UART_BOOTLOADER_PYTHON_SCRIPT to boot the application.
OR
You can flash the SBL built from SBL UART UNIFLASH + SBL_OSPI into the flash which will bring the application into the device via UART using https://software-dl.ti.com/mcu-plus-sdk/esd/AM243X/08_05_00_24/exports/docs/api_guide_am243x/TOOLS_FLASH.html#TOOLS_UART_UNIFLASH_GUI to flash the application. Merging the SBL_OSPI to boot the application flashed is something you need to try yourself, we can support in case you are stuck on the same.
Hope this helps.
Best Regards,
Aakash
Hi Aakash,
if I understand correctly after loading I will always have to set the BOOTMODE pins of the MCU in UART mode to write the flash using https://software-dl.ti.com/mcu-plus-sdk/esd/AM243X/08_05_00_24/exports/docs/api_guide_am243x/TOOLS_FLASH.html#TOOLS_UART_UNIFLASH_GUI
And then switch to BOOTMODE OSPI to start the loaded fimrware's execution, correct? Is there any software work-around I can use to avoid this step?
If there is no work-around it won't be a problem, I can look for an hardware solution with my custumer.
Hi Andrea Favero,
You can go with a software flow like this -
I have created a software block diagram as per my expertise and this seems very feasible with software only.
You can take a look at this flow and we can discuss this over call if you have any issues.
Best Regards,
Aakash
Hi Aakash Kedia,
this sounds clear to me, I'll try implement it in the next days and let you know if I encounter any issue.
Thank you for the help,
Best regards,
Andrea
Hi Aakash Kedia,
just an update: I followed your software flow and now the bootloader works
Best Regards,
Andrea