SPRUIZ1B July 2023 – August 2024 TMS320F28P650DH , TMS320F28P650DK , TMS320F28P650SH , TMS320F28P650SK , TMS320F28P659DH-Q1 , TMS320F28P659DK-Q1 , TMS320F28P659SH-Q1
Similar to PIE Vector Table Swap, LS0 and LS1 physical RAM memory blocks can also be swapped. LS0/LS1 memory swapping is for CPU1. The memory architecture is similar to PIE vector table swap, and is shown in Figure 3-22. By default, physical Block 1 is assigned to addresses 0x8000-0x87FF (that is, the address range for LS0), and physical Block 2 is assigned to addresses 0x8800-0x8FFF (that is, the address range for LS1). By configuring LFUConfig.LS01Swap = 1, user application code can execute a swap, where physical Block 2 is now assigned to addresses 0x8000-0x87FF (that is, the address range for LS0), and physical Block 1 is now assigned to addresses 0x8800-0x8FFF (that is, the address range for LS1).
If physical memory Block 1 contains function pointers for the current firmware, the same relative locations in physical memory Block 2 can be populated with function pointers for the new firmware prior to LFU switchover. During LFU switchover, a simple swap operation is initiated by user application code, and this operation takes just 1 CPU clock cycle. This allows user application code to always have function pointers in LS0, yet have two different physical blocks that can map to the LS0 address range.
For example, if current firmware contains 10 function pointers present at the start of Block 1 (LS0 address space). If the new firmware contains the same 10 function pointers that now need to be updated, the user application code can place these at the start of Block 2 (LS1 address space) prior to LFU switchover. During LFU switchover, the user application code can execute a LS0/LS1 RAM memory swap, where the physical RAM block previously mapped to the LS1 address space is now mapped to the LS0 address space, and hence can be used seamlessly for function pointer addressing for the new firmware.
The register bit LFUStatus.LS01Swap provides the status of LS0/LS1 RAM memory swap.