Integration of the eDMA module on S32K14x
Optimizing the S32K1xx eDMA for Performance Demanding Applications, Rev. 0, 02/2021
4 NXP Semiconductors
1. Priority configuration: eDMA has the capability to select fixed priority or round robin between
channels, depending on the application, you could need one channel to have higher priority than
others. It is more optimum to have fixed priority and assigned higher priority to critical channels,
but some cases and depending in the application, this is not an option.
2. Number of channels: As long as there is only one eDMA engine, only one channel can be
serviced at a time. With more active channels and constant eDMA requests, it is very likely to
have delays to attend one channel as other channel is being attended.
3. Bandwidth control: In some applications (with large transfer size) you need to avoid starvations
of other bus master in the crossbar, and in order to do this, eDMA can stall its own engine for
each R/W operation. This option allows other masters (like CPU) to take control of the slave port
and be able to work along with the eDMA. This feature does not improve the performance, but it
needs to be taken in consideration for some implementations.
4. Transfer size: eDMA supports programmable source, destination and transfer size, for data
transfers where the source and destination sizes are equal, the eDMA engine performs a series of
source-read / destination-write operations. For descriptors where the sizes are not equal, multiple
accesses of the smaller size data are required for each reference of the larger size. E.g. Source
sizes references 8-bit data and destination is 32-bit data, four reads are performed, then one
single 32-bit write.
5. eDMA Features enabled: There are some features of the eDMA (like Scatter gather, linking
channel or Minor loop offset) that can ease the implementation of specific applications. Some of
those features has the disadvantage of increasing transfer times and in those cases, software
designer must analyze the potential benefits at the expense of eDMA performance.
2.1.
Scatter Gather feature
Scatter Gather (SGA) feature allows an eDMA channel to load different Transfer Control Descriptors
(TCD) when major loop is completed. The basic idea is that when one channel completes its major loop,
the channel will be reloaded with a new TCD that is saved in local memory, all without the intervention
of the CPU.
This capability allows the user to define different TCDs for one channel, but it causes a delay in the
eDMA transfers because to load the new TCD at the end of the major loop the eDMA engine needs to
de-reference the pointer address of the TCD from the memory where it was saved (flash or RAM), so
the eDMA engine needs to go through some busses to reach it, this represents clock cycles added to the
process which could increase depending in bus availability.
The following figure shows the path that the eDMA engine must go through in order to recharge the
TCD config (yellow) and the possible bottleneck by bus traffic (red) (assuming TCD is saved in RAM).