To perform LFU while making substantial changes between the old and new application images, the user needs to be aware of the following:
- LFU Compiler support helps maintain state of common global variables (preserving their address
in RAM, and avoiding their initialization during LFU switchover).
__TI_auto_init_warm()
executes in tandem with the old application's ISRs, therefore it does not
matter how long __TI_auto_init_warm() takes. This means there is no
limitation on the number of variables that need to be
initialized.
- LFU Switchover timing – this is important when the control loop ISRs run on the C28x CPU. On the F28003x, LFU hardware features on the device like PIE vector swapping and RAM block swapping allow significant flexibility in the number of interrupt vectors and function pointers that need to be updated on LFU. Irrespective of the number of vectors or function pointers, a single cycle swap implements is all that is needed. However, on the F28004x, these hardware features are not present, so each PIE vector and function pointer needs to be individually updated, which proportionately increases LFU switchover time. If this exceeds idle time, then interrupt execution is affected, which is not acceptable.
- LFU Switchover timing - in general, this is not an issue when the control loop ISRs run on the
CLA. Disabling global interrupts affects only the C28x CPU, not the CLA. CLA
tasks (other than the background task) are not disabled and re-enabled during
LFU.
- Another important aspect to consider is RAM
memory overlaps between the custom bootloader (SCI Flash Kernel) and the
Application:
- In general, avoid RAM section overlaps between SCI Flash Kernel and the
Application. If this is not possible, verify using the generated .map
files for the SCI Flash Kernel and the Application that there are no RAM
memory overlaps, as this will break functionality.
- In the case of LFU with
the CLA, some LSRAM sections are designated in the Application as
Program and some as Data. Ensure that this does not conflict with the
SCI Flash Kernel. In other words, do not place Application Program in
sections that the SCI Flash kernel is using for data, and vice
versa.