SPRUJB6B November 2024 – May 2025 AM2612
The FLC module consists of a DMA engine that allows a region of the slow memory like Flash to be dynamically copied to a section of system on-chip memory (such as SRAM, TCM), and while that is happening, can be running the code that was specified to be copied. The CPU does not have to wait for the entire copy to complete. It can start executing immediately after FLC copy has been triggered.
The FLC will redirect the request to the on-chip memory on the fly if the data has been transferred to the on-chip memory. Otherwise the request is sent to the slow device. This allows the Software to specify a piece of code to be resident in the system but executed out of the flash using on-chip system memory. The on-chip memory redirection does not wait till the entire region is mirrored, but is enabled as soon as the content at that address is valid in the memory. Also, the FLC will copy data only when the CPU bus is idle.
The FLC will transfer any enabled FLC range in order from FLC range 0 through 3. The FLC[n]_LO and FLC[n]_HI (n=0,1,2,3) registers defines the start and end address of the FLC range in the source memory (such as Flash). The FLC range is defined by FLC[n]_LO>=FLCrange<FLC[n]_HI.
The FLC ranges can start and end on any 4K Byte boundary. Care must be taken as to not create overlapping ranges across regions. The minimum size of a FLC region is 4K Bytes.
The FLC[n]_RA (n=0,1,2,3) remote address registers specifies the base address of the destination memory (such as SRAM) that the FLC will copy data to, from the source memory. The destination memory must be large enough for the specified range. The FLC[n]_CTRL.fenable enables the given range FLC[n]_LO>=FLCrange<FLC[n]_HI to be copied to the FLC[n]_RA SRAM memory (n=0,1,2,3). The FLC will automatically transfer FLC ranges to the FLC Remote Address specified for that range. The RL2_OF module will only transfer a single FLC range at a time. FLC_STS.cpycmp will indicates which FLC range is complete.
Disabling a FLC range during the transfer will cause the transfer to stop, and when all pending transactions for that FLC completes, the next possible enabled FLC range will commence.
The FLC transfer will be aborted if the FLC data returned from the range has an error or the write to the FLC target memory returns an error. In this case all FLC transfers are disabled until the error interrupt is cleared. Only completed FLC transfers will operate during a FLC posted error.
Since the copy of FLC range is independent from RAT ranges, the FLC copy function could be used to transfer the Flash data to the RAT target address. But do remember that the FLC range will access the target if it is already copied. So once copied, the FLC range should be disabled.