3.1.2 Tasks Description
This section provides a detailed description of tasks used in the UART firmware upgrade mode.
- Communication Task – Responsible for receiving data from the Host PC through the selected communication interface in interrupt mode. It validates the incoming packet against the expected header information before passing it to the command processing task.
- Command Processing Task – Handles the commands received from the communication task and acts on them. It responds to the Host PC accordingly. If the received command is related to programming, it delegates control to the programming task.
- Programming Task – Responsible for programming the internal Flash memory with the received data packet. It utilizes the Non-Volatile Memory (NVM) peripheral library to perform unlock, erase, or write operations. While waiting for the Flash operation to complete, it invokes the communication task in parallel to receive the next packet.
The following figure illustrates the flowchart of the firmware upgrade execution.
