SPRUIZ1B July 2023 – August 2024 TMS320F28P650DH , TMS320F28P650DK , TMS320F28P650SH , TMS320F28P650SK , TMS320F28P659DH-Q1 , TMS320F28P659DK-Q1 , TMS320F28P659SH-Q1
For CPU2, D2 and D3 physical RAM memory blocks can be swapped. The memory architecture is shown in Figure 3-23. By default, physical Block 1 is assigned to addresses 0x8000-0x9FFF (that is, the address range for D2), and physical Block 2 is assigned to addresses 0xA000-0xCFFF (that is, the address range for D3). By configuring LFUConfig.D23Swap = 1, user application code can execute a swap, where physical Block 2 is now assigned to addresses 0x8000-0x9FFF (that is, the address range for D2), and physical Block 1 is now assigned to addresses 0xA000-0xCFFF (that is, the address range for D3).
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 D2, yet have two different physical blocks that can map to the D2 address range.
For example, if current firmware contains 10 function pointers present at the start of Block 1 (D2 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 (D3 address space) prior to LFU switchover. During LFU switchover, the user application code can execute a D2/D3 RAM memory swap, where the physical RAM block previously mapped to the D3 address space is now mapped to the D2 address space, and hence can be used seamlessly for function pointer addressing for the new firmware.
The register bit LFUStatus.D23Swap provides the status of D2/D3 RAM memory swap.