To monitor a hardware synchronized DMA transfer, initialize the DMA4_CDACi register before the software enable.
To configure an LCh to synchronize by element, packet, frame, or block, the frame synchronization DMA4_CCRi[5] FS bit and the block synchronization DMA4_CCRi[18] BS bit must be programmed. For all the following synchronized transfers (element, packet, and frame or block-synchronized transfers), the user must first set the DMA4_CCRi[24] SEL_SRC_DST_SYNC bit to 1 when the source triggers on the DMA request and set it the DMA4_CCRi[24] SEL_SRC_DST_SYNC bit to 0 when the destination triggers on the DMA request.
Note: The user must take care when setting the DMA4_CCRi[23] PREFETCH bit it is in conjunction with DMA4_CCRi[24] SEL_SRC_DST_SYNC bit.
- To configure an LCh to transfer one element per DMA request:
- Set the number of DMA request associated with the current LCH in the DMA4_CCRi[20:19] SYNCHRO_CONTROL_UPPER and DMA4_CCRi[4:0] SYNCHRO bit field.
- Set the data type, also referenced as element size (ES), in the DMA4_CSDPi[1:0] DATA_TYPE bit field.
- Set the Read Port access type (single or burst access) in the DMA4_CSDPi[8:7] SRC_BURST_EN bit field.
- Set the Write Port access type (single or burst access) in the DMA4_CSDPi[15:14] DST_BURST_EN bit field.
- Set the Read Port addressing mode in the DMA4_CCRi[13:12] SRC_AMODE bit field.
- Set the Write Port addressing mode in the DMA4_CCRi[15:14] DST_AMODE bit field.
- Set the Read start address in the DMA4_CSSAi[31:0] SRC_START_ADRS bit field.
- Set the Write start address in the DMA4_CDSAi[31:0] DST_START_ADRS bit field.
- Set both FS and BS to 0 in DMA4_CCRi[5] FS and DMA4_CCRi[18] BS.
- Set to 1 the channel enable bit DMA4_CCRi[7] EN.
- To configure an LCh to transfer one frame per DMA request:
- Set the number of DMA request associated to the current LCH in the DMA4_CCRi[20:19] SYNCHRO_CONTROL_UPPER and DMA4_CCRi[4:0] SYNCHRO bit field.
- Set the data type, also referenced as element size (ES), in the DMA4_CSDPi[1:0] DATA_TYPE bit field.
- Set the number of element per frame in the DMA4_CENi[23:0] CHANNEL_ELMNT_NBR bit field.
- Set the Read Port access type (single or burst access) in the DMA4_CSDPi[8:7] SRC_BURST_EN bit field.
- Set the Write Port access type (single or burst access) in the DMA4_CSDPi[15:14] DST_BURST_EN bit field.
- Set the Read Port addressing mode in the DMA4_CCRi[13:12] SRC_AMODE bit field.
- Set the Write Port addressing mode in the DMA4_CCRi[15:14] DST_AMODE bit field.
- Set the Read start address in the DMA4_CSSAi[31:0] SRC_START_ADRS bit field.
- Set the Write start address in the DMA4_CDSAi[31:0] DST_START_ADRS bit field.
- Set FS to 1 and BS to 0, respectively, in DMA4_CCRi[5] FS and DMA4_CCRi[18] BS.
- Set to 1 the channel enable bit DMA4_CCRi[7] EN.
- To configure an LCh to transfer one block per DMA request:
- Set the number of DMA request associated to the current LCH in the DMA4_CCRi[20:19] SYNCHRO_CONTROL_UPPER and DMA4_CCRi[4:0] SYNCHRO bit field.
- Set the data type, also referenced as element size (ES), in the DMA4_CSDPi[1:0] DATA_TYPE bit field.
- Set the number of element per frame in the DMA4_CENi[23:0] CHANNEL_ELMNT_NBR bit field.
- Set in the DMA4_CFNi[15:0] CHANNEL_FRAME_NBR bit field the number of frame (transfers), to take place before the LCH gets disabled.
- Set the Read Port access type (single or burst access) in the DMA4_CSDPi[8:7] SRC_BURST_EN bit field.
- Set the Write Port access type (single or burst access) in the DMA4_CSDPi[15:14] DST_BURST_EN bit field.
- Set the Read Port addressing mode in the DMA4_CCRi[13:12] SRC_AMODE bit field.
- Set the Write Port addressing mode in the DMA4_CCRi[15:14] DST_AMODE bit field.
- Set the Read start address in the DMA4_CSSAi[31:0] SRC_START_ADRS bit field.
- Set the Write start address in the DMA4_CDSAi[31:0] DST_START_ADRS bit field.
- Set FS to 0 and BS to 1, respectively, in DMA4_CCRi[5] FS and DMA4_CCRi[18] BS.
- Set to 1 the channel enable bit DMA4_CCRi[7] EN.
- To configure an LCh to transfer one packet per DMA request:
- Set the number of DMA request associated to the current LCH in the DMA4_CCRi[20:19] SYNCHRO_CONTROL_UPPER and DMA4_CCRi[4:0] SYNCHRO bit field.
- Set the data type, also referenced as element size (ES), in the DMA4_CSDPi[1:0] DATA_TYPE bit field.
- Set the number of elements per packet to transfer: If the packet requestor is in the source, set DMA4_CCRi [24] SEL_SRC_DST_SYNC to 1 and set the packet element number in the DMA4_CSFIi register and set the addressing mode of source to constant addressing in DMA4_CCRi[13:12] SRC_AMODE bit field; else, if the packet requestor is in the destination, set the DMA4_CCRi[24] SEL_SRC_DST_SYNC to 0 and set the packet element number in the DMA4_CDFIi register and set the addressing mode of destination to constant addressing in DMA4_CCRi[15:14] DST_AMODE bit field.
- Set the number of elements per frame in the DMA4_CENi[23:0] CHANNEL_ELMNT_NBR bit field.
- Set in the DMA4_CFNi[15:0] CHANNEL_FRAME_NBR bit field the number of frames (transfers), to take place before the LCH gets disabled.
- Set the element number in the packet in the DMA4_CSFIi[15:0] PKT_ELNT_NBR, if constant addressing or post-incremented addressing modes are used in the source side. However, the number of element in the packet is set in the DMA4_CDFIi[15:0] PKT_ELNT_NBR if constant addressing mode is used in the destination side.
- Set the Read Port access type (single or burst access) in the DMA4_CSDPi[8:7] SRC_BURST_EN bit field.
- Set the Write Port access type (single or burst access) in the DMA4_CSDPi[15:14] DST_BURST_EN bit field.
- Set the Read Port addressing mode in the DMA4_CCRi[13:12] SRC_AMODE bit field.
- Set the Write Port addressing mode in the DMA4_CCRi[15:14] DST_AMODE bit field.
- Set the Read start address in the DMA4_CSSAi[31:0] SRC_START_ADRS bit field.
- Set the Write start address in the DMA4_CDSAi[31:0] DST_START_ADRS bit field.
- Set FS to 1 and BS to 1, respectively, in DMA4_CCRi[5] FS and DMA4_CCRi[18] BS.
- Set to 1 the channel enable bit DMA4_CCRi[7] EN.
Note: It is possible to stop a transfer by disabling the channel by resetting the DMA4_CCRi[7] ENABLE bit.