Public Version
SDMA Basic Programming Model
www.ti.com
In the RAM to RAM copy example, to copy in loop it's possible to link channel 10 on itself. The following
line can be added in the channel configuration :
/* g) Set link for loop */ DMA4_CLINK_CTRL_CH10 = 0x0000800A;
11.5.7 90° Clockwise Image Rotation
The 90° clockwise image rotation example described in
, Addressing Modes, can be
programmed as follows:
1. Configure the transfer parameters in the logical DMA channel registers:
•
–
Transfer ES = 32-bit (32 bpp), DMA register bits
–
Read and write port access types = maximum burst size supported by memory device, DMA
register bits
[8:7] and
–
Source and destination endianism, DMA register bits
[21] and
–
Write mode = posted with last element nonposted, DMA register bits
[17:16]
–
Source and destination packed = Yes (although destination writes will not benefit because
EI>1), DMA register bits
[6] and
•
: EN = 240
•
: FN per transfer block = 160
•
: Source start address = 0x100000
•
: destination start address = 0x20013E
•
:
–
Read and write port addressing modes = double-index addressing mode for both or
post-increment addressing on source and double-index addressing on destination, DMA
register bits
[13:12] and
–
Low or high priority, DMA register bit
–
DMA request number = 0 (for software-triggered transfer), DMA register bits
and
[20:19]
•
DMA4_CSEi: Source EI = 1
•
DMA4_CSFi: Source frame index = 1
•
DMA4_CDEi: destination EI = 637
•
DMA4_CDFi: destination frame index = –152967
2. Start the transfer via the enable bit in the channel
register.
Below are the parameters to perform this rotation from 0x80C00000 RAM address to 0x80F00000, with
the same code as in
:
/* 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_CSEi DMA4->SourceFrameIndex = 1; // DMA4_CSFi DMA4->DestinationElementIndex = 637; //
DMA4_CDEi DMA4->DestinationFrameIndex = -152967; // DMA4_CDFi 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]
11.5.8 Graphic Operations
•
Transparent copy:
–
1. Set the
[17] Transparent_Copy_Enable bit field to 1.
–
2. Set the
[16] Constant_Fill_Enable bit field to 0.
–
3. Set the value of key the color in the
[15:0] color_key bit field.
To perform this graphic operation, the following lines can be added to the example of
DMA4_CCR_CH10 &= ~(0x1 << 16); DMA4_CCR_CH10 |= 0x1 << 17; DMA4_COLOR_CH10 = 0x00000003;
•
Solid Color fill:
2372
SDMA
SWPU177N – December 2009 – Revised November 2010
Copyright © 2009–2010, Texas Instruments Incorporated
Содержание OMAP36 Series
Страница 174: ...174 List of Tables SWPU177N December 2009 Revised November 2010 Copyright 2009 2010 Texas Instruments Incorporated ...
Страница 692: ...692 MPU Subsystem SWPU177N December 2009 Revised November 2010 Copyright 2009 2010 Texas Instruments Incorporated ...
Страница 1084: ...1084 IVA2 2 Subsystem SWPU177N December 2009 Revised November 2010 Copyright 2009 2010 Texas Instruments Incorporated ...
Страница 1990: ...1990 2D 3D Graphics Accelerator SWPU177N December 2009 Revised November 2010 Copyright 2009 2010 Texas Instruments Incorporated ...
Страница 2334: ...2334 Memory Subsystem SWPU177N December 2009 Revised November 2010 Copyright 2009 2010 Texas Instruments Incorporated ...
Страница 2700: ...2700 Memory Management Units SWPU177N December 2009 Revised November 2010 Copyright 2009 2010 Texas Instruments Incorporated ...
Страница 2868: ...2868 HDQ 1 Wire SWPU177N December 2009 Revised November 2010 Copyright 2009 2010 Texas Instruments Incorporated ...
Страница 2974: ...2974 UART IrDA CIR SWPU177N December 2009 Revised November 2010 Copyright 2009 2010 Texas Instruments Incorporated ...
Страница 3054: ...3054 Multichannel SPI SWPU177N December 2009 Revised November 2010 Copyright 2009 2010 Texas Instruments Incorporated ...
Страница 3462: ...3462 MMC SD SDIO Card Interface SWPU177N December 2009 Revised November 2010 Copyright 2009 2010 Texas Instruments Incorporated ...
Страница 3508: ...3508 General Purpose Interface SWPU177N December 2009 Revised November 2010 Copyright 2009 2010 Texas Instruments Incorporated ...
Страница 3584: ...3584 Initialization SWPU177N December 2009 Revised November 2010 Copyright 2009 2010 Texas Instruments Incorporated ...
Страница 3648: ...3648 Debug and Emulation SWPU177N December 2009 Revised November 2010 Copyright 2009 2010 Texas Instruments Incorporated ...