SPRUI30H November 2015 – May 2024 DRA745 , DRA746 , DRA750 , DRA756
The 90-degree clockwise image rotation example described in Section 16.1.4.5, Addressing Modes, can be programmed as follows:
The following parameters are used to perform this rotation from 0x80C00000 RAM address to 0x80F00000, with the same code used in Section 16.1.5.2, Software-Triggered (Nonsynchronized) Transfer:
/* Init. parameters */
DMA4->DataType = 0x2; //
DMA4_CSDPi[1:0]
DMA4->ReadPortAccessType = 0x3; // DMA4_CSDPi[8:7]
DMA4->WritePortAccessType = 0x3; // DMA4_CSDPi[15:14]
DMA4->SourceEndiansim = 0; // DMA4_CSDPi[21]
DMA4->DestinationEndianism = 0; // DMA4_CSDPi[19]
DMA4->WriteMode = 0x2; // DMA4_CSDPi[17:16]
DMA4->SourcePacked
= 0x1; // DMA4_CSDPi[6]
DMA4->DestinationPacked = 0x1; //
DMA4_CSDPi[13]
DMA4->NumberOfElementPerFrame = 240; // DMA4_CENi
DMA4->NumberOfFramePerTransferBlock = 160; // DMA4_CFNi
DMA4->SourceStartAddress = 0x80C00000; // DMA4_CSSAi
DMA4->DestinationStartAddress = 0x80F00000; // DMA4_CDSAi
DMA4->SourceElementIndex = 1; // DMA4_CSEIi
DMA4->SourceFrameIndex = 1; // DMA4_CSFIi
DMA4->DestinationElementIndex = 637; // DMA4_CDEIi
DMA4->DestinationFrameIndex = -152967; // DMA4_CDFIi
DMA4->ReadPortAccessMode = 0x3; // DMA4_CCRi[13:12]
DMA4->WritePortAccessMode = 0x3; // DMA4_CCRi[15:14]
DMA4->ReadPriority = 0; // DMA4_CCRi[6]
DMA4->WritePriority =
0; // DMA4_CCRi[23]
DMA4->ReadRequestNumber = 0; // DMA4_CCRi[4:0]
DMA4->WriteRequestNumber = 0; // DMA4_CCRi[20:19]