SPRUI30H November 2015 – May 2024 DRA745 , DRA746 , DRA750 , DRA756
Many applications require the use of multiple data arrays, it is often desirable to have the arrays arranged such that the first elements of each array are adjacent, the second elements are adjacent, and so on. Often this is not how the data is presented to the device. Either data is transferred via a peripheral with the data arrays arriving one after the other or the arrays are located in memory with each array occupying a portion of contiguous memory spaces. For these instances, the EDMA can reorganize the data into the desired format.
To determine the parameter set values, the following need to be considered:
The synchronization type needs to be AB-synchronized and the EDMA_TPCC_OPT_n[3] STATIC bit is 0 to allow updates to the parameter set. It is advised to use normal EDMA channels for sorting.
It is not possible to sort this with a single trigger event. Instead, the channel can be programmed to be chained to itself. After BCNT elements get sorted, intermediate chaining could be used to trigger the channel again causing the transfer of the next BCNT elements and so on. Figure 16-38 shows the parameter set programming for this transfer, assuming channel 0 and an element size of 4 bytes.
Figure 16-37 shows the Data Sorting transfer
(a) EDMA Parameters |
Parameter Contents | Parameter | |||||
0090 0004h | Channel Options Parameter (OPT) | |||||
Channel Source Address (SRC) | Channel Source Address (SRC) | |||||
0400h | 0004h | Count for 2nd Dimension (BCNT) | Count for 1st Dimension (ACNT) | |||
Channel Destination Address (DST) | Channel Destination Address (DST) | |||||
0010h | 0001h | Destination BCNT Index (DSTBIDX) | Source BCNT Index (SRCBIDX) | |||
0000h | FFFFh | BCNT Reload (BCNTRLD) | Link Address (LINK) | |||
0001h | 1000h | Destination CCNT Index (DSTCIDX) | Source CCNT Index (SRCCIDX) | |||
0000h | 0004h | Reserved | Count for 3rd Dimension (CCNT) |
(b) Channel Options Parameter (OPT) Content