25.7.3.13 Data Reordering

Data read from the source can be re-ordered to allow for various byte orders of the source data, such as endianness. The re-ordered source data is written to the channel destination when CHCTRLBk.WBOEN = 1’. The unaltered initial source data is written to the destination when CHCTRLBk.WBOEN = 0. The following figure shows the different byte order settings and the effect on data reads. BYTORD value of ‘01’ is useful for re-ordering bytes within words. While BYTORD values of ‘10’ and ‘11’ is useful for re-ordering bytes within half-words.

Note:
  1. Data is re-ordered as it is read. This means that data that is not word-aligned may not be re-ordered correctly. Both the block and cell sizes must also be word-aligned.
  2. The CRC will process data such that the final result is the same regardless of read address mode (byte, halfword, or word). This is completely transparent to software. This reordering for the CRC block is explained in more detail in CRC and Checksum Engine and is independent of the BYTORD setting for the channel. In this way, this would allow the user, in CRC mode, to byte reorder the data from source to destination using a different swapping than is required for the CRC calculation.
Figure 25-8. CHCTRLB.BYTORD[1:0] Effect on Data
Table 25-3. Example Data Re-order
Byte Order
3210
Source Address0x780x560x340x12
Destination Address0x120x340x560x78