3.2.2.2 Client Tasks
- Communication Task – Tasked with the reception of data from the embedded host through the chosen communication interface, operating in interrupt mode. This task ensures the integrity of the incoming data packet by validating its header information against expected parameters before forwarding it to the Command Processing Task for further action.
- Command Processing Task – Responsible for the interpretation and execution of commands relayed by the Communication Task. It communicates responses back to the host as required. In instances where the command pertains to programming, this task delegates control to the programming task to carry out the necessary operations.
- Image Decryption Task – Entrusted with the decryption of firmware data and associated tags received from the host, utilizing the internal secure element (ATECC608B) for this purpose. It ensures the authenticity of the data by comparing it with the decrypted tag before proceeding to transfer the data to the programming task for implementation.
- Programming Task – Holds the responsibility for updating the internal Flash memory with the data packets it receives. To accomplish this, it leverages the NVM peripheral library, which facilitates the necessary unlock, erase, and write operations to ensure successful programming of the memory.
The following figure illustrates the flowchart of the firmware upgrade execution on the client.
