JAJU804D August 2022 – December 2022
Figure 2-3 shows the LFU software flow diagram. After a device reset, execution always begins in the bank selection logic, which determines which Flash bank to execute from based on the firmware revision field, and pass control to the corresponding application. After necessary system initialization and enabling of interrupts, a real-time control loop executes within an ISR corresponding to a specific interrupt vector. During the idle time between ISRs, a background loop consisting of lower priority functions executes. If the host issues an LFU command, it triggers an SCI Receive interrupt in the MCU, and a corresponding ISR (lower in priority than the control-loop ISR) executes and identifies a host command request.
In the background loop, the command is parsed, the LFU request is identified, control passes to the custom bootloader i.e. SCI Flash kernel, which downloads the new application image from the host and programs the appropriate Flash bank. If the application on Flash bank 1 is running, then control passes to the SCI Flash Kernel on bank 1, so as to program bank 0. Once the new application image is in Flash, the process of switching over to new firmware can begin.
Figure 2-3 LFU Software Flowchart