SLAAEC9 july 2023 MSPM0L1306 , MSPM0L1306
One task switch management tool is needed so that the application code keeps executing during firmware upgrade process. In this application note, FreeRTOS is used to handle this job and create four tasks for this demo.
Tasks Name | Priority | Description |
---|---|---|
Bootloader Task | 2 | Task to handle firmware upgrade. This task is suspended if application code is executing. |
LED0 Toggle Task | 1 | Task to toggle LED every 500ms, this is used to show that FreeRTOS is working without problems. |
Application task | 1 | Task to execute application code. |
Idle | 0 | Default task when no any other task is pending for execution. |
On a new device, the bootloader firmware needs to be programmed via SWD interface first, so that bootloader communicates with the host (PC GUI or the host MCU) and update the application code. The application code can also be programmed along with bootloader firmware via SWD.
When the device boots up and there is no application code, the bootloader waits for the firmware upgrade command from the host.
Figure 4-2 illustrates the bootloader flow diagram.
The bootloader supports below commands. For detailed information, see Section 6.