EZ-USB FX3 Technical Reference Manual, Document Number: 001-76074 Rev. *F 49
Memory and System Interconnect
2. Ensure that the memory region corresponding to a DMA buffer is cleaned from the D-cache before initiating any egress
(data output from FX3) data transfers.
3. Ensure that the memory region corresponding to a DMA buffer is flushed (evicted) from the D-cache before initiating any
ingress (data input into FX3) data transfers.
3.3.5 Memory Usage
The TCM and system RAM regions on the FX3 device are general purpose and can be used by the firmware application as
desired. The only constraints are as follows:
â– The initial part of the I-TCM (approximately 256 bytes starting at address 0) is reserved for setting up the ARM exception
vectors.
â– The initial part of the system RAM (12 KB starting from address 0x40000000) is reserved for setting up DMA transfer-
related data structures.
â– The TCM regions cannot be used for direct data transfers, as the DMA engine does not support data transfers from/to
these regions.
This section provides guidelines on mapping out the firmware code, data, and DMA buffers within the available memory on
the device.
Table 3-2 shows the memory sections required by an FX3 firmware application. Figure 3-3 shows the mapping of these
sections to FX3 memory addresses in a typical application. The size of the sections other than exception vectors and DMA
descriptors can be set according to the needs of the application.
Table 3-2. Memory Regions Used by an FX3 Application
Section Name Description
Vectors ARM exception vectors; needs to be located at the beginning of the I-TCM region
Text All executable code for the application
Data Explicitly initiated global data used by the application
BSS Uninitialized global data used by the application
Stacks Stack regions for the ARM processor operating modes (supervisor, user, IRQ, FIQ, abort, and undefined)
Heap
Run-time heap for dynamic allocation (malloc or new) of variables used by the application; this section is optional and is only required
if dynamic memory allocation (malloc, free, new, delete) is used
DMA descriptors
Memory region reserved for DMA transfer-related data structures; these structures are used by the FX3 hardware and have to be
located at the beginning of the system RAM region
DMA buffer
Memory region reserved for DMA data buffers used by the application; as larger DMA buffers can improve data transfer throughput, it
is recommended that as much memory as is possible be allocated to this section