1
11-1
Section 11 Section 11 Direct Memory Access (DMA) a 11-1 1 - - PowerPoint PPT Presentation
Section 11 Section 11 Direct Memory Access (DMA) a 11-1 1 ADSP-BF533 Block Diagram L1 Core Instruction Timer 64 Memory Performance Core LD0 32 Monitor Processor L1 Data LD1 32 Memory JTAG/ Debug SD32 Core D0 bus Core I bus
11-1
11-2
Watchdog And Timers DMA Controller UART0 IRDA Real Time Clock Programmable flags SPORTs SPI EBIU 1KB internal Boot ROM
CORE/SYSTEM BUS INTERFACE
32 Core D1 bus 64 Core I bus Core Timer JTAG/ Debug Performance Monitor Core Processor L1 Instruction Memory L1 Data Memory LD1 32 64 PPI
Peripheral Access Bus (PAB) DMA Access Bus (DAB) External Access Bus (EAB)
Power Management Event Controller 32 DMA Mastered bus
Core DA0 bus 32 32 Core D0 bus Core DA1 bus 32
Core Clock (CCLK) Domain System Clock (SCLK) Domain
LD0 32 16 16 16 16
External Port Bus (EPB) DMA Ext Bus (DEB)
16
DMA Core Bus (DCB)
16 SD32
Data Address Control
11-3
11-4
11-5
11-6
Fixed Memory DMA Stream 1 TX (destination) 10 Fixed Memory DMA Stream 1 RX (source) 11 - lowest Fixed Memory DMA Stream 0 RX (source) 9 Fixed Memory DMA Stream 0 TX (destination) 8 Re-assignable UART TX 7 Re-assignable UART RX 6 Re-assignable SPI 5 Re-assignable SPORT1 TX 4 Re-assignable SPORT1 RX 3 Re-assignable SPORT0 TX 2 Re-assignable SPORT0 RX 1 Re-assignable PPI 0 – highest Comments Default Peripheral Mapping DMA Channel
11-7
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1
Reset = 0x0000
11-8
11-9
11-10
Start_Addr[15:0] Start_Addr[31:16] DMA_Config X_Count X_Modify Y_Modify Y_Count Start_Addr[15:0] Start_Addr[31:16] DMA_Config X_Count X_Modify Y_Modify Y_Count Start_Addr[15:0] Start_Addr[31:16] DMA_Config ……….………… …………………. Descriptor Block 1 Descriptor Block 2 Descriptor Block 3 0x0 0x2 0x4 0x6 0x8 0xA 0xC 0xE 0x10 0x12 0x14 0x16 0x18 0x1A 0x1C 0x1E 0x20
Next_Desc_Ptr[15:0] Start_Addr[15:0] Start_Addr[31:16] DMA_Config X_Count X_Modify Y_Modify Y_Count Next_Desc_Ptr[15:0] Start_Addr[15:0] Start_Addr[31:16] DMA_Config X_Count X_Modify Y_Modify Y_Count Next_Desc_Ptr[15:0] Start_Addr[15:0] Start_Addr[31:16] DMA_Config X_Count X_Modify Y_Modify Y_Count
Next_Desc_Ptr[31:16] Start_Addr[15:0] Start_Addr[31:16] DMA_Config X_Count X_Modify Y_Modify Y_Count Next_Desc_Ptr[15:0] Next_Desc_Ptr[31:16] Start_Addr[15:0] Start_Addr[31:16] DMA_Config X_Count X_Modify Y_Modify Y_Count Next_Desc_Ptr[15:0] Next_Desc_Ptr[31:16] Start_Addr[15:0] Start_Addr[31:16] DMA_Config X_Count X_Modify Y_Modify Y_Count Next_Desc_Ptr[15:0]
11-11
signaling an interrupt if enabled.
DMAx MMR settings. On completion of the DMA transfer, the Parameter registers are reloaded into the Current registers, and DMA resumes immediately with zero overhead. Autobuffer mode is stopped by a user write of 0 to the DMA enable bit in the DMAx_DMA_Config Register.
Descriptor Blocks are placed one after the other within memory like an array.
NEXT_DESC_PTR parameter. The upper 16 bits are taken from the upper 16 bits of the NEXT_DESC_PTR register, thus confining all descriptors to a specific 64K page in memory.
thus allowing maximum flexibility in locating descriptors in memory.
11-12
11-13
Initialize all of the following: START_ADDR X_COUNT X_MODIFY Y_COUNT (if 2D DMA) Y_MODIFY (if 2D DMA) DMA_CONFIG
Initialize all of the following: START_ADDR X_COUNT X_MODIFY Y_COUNT (if 2D DMA) Y_MODIFY (if 2D DMA) DMA_CONFIG
Initialize at least: CURR_DESC_PTR[31:16] CURR_DESC_PTR[15:0]
Initialize at least: NEXT_DESC_PTR[31:16] NEXT_DESC_PTR[15:0]
Initialize at least: NEXT_DESC_PTR[31:16] NEXT_DESC_PTR[15:0]
11-14
11-15
11-16
11-17
11-18
Important Register: Allows the definition of transfer sizes in a given direction on DMA busses Max values usually yield best performance but it is application dependent Arrows represent transfers in and out of SDRAM Without traffic control With traffic control 2 Reads and 2 writes are more efficient with traffic control
11-19
…………. …………. …………. …………. …………. …………. …………. …………. …………. …………. ……... ……... ……... ……... ……... ……... ……... ……... ……... ……... ……... ……... ……... ……... ……... ……... ……...
11-20
11-21
Parameter Registers Current Registers Control / Status Registers
11-22
Parameter Registers Current Registers Control / Status Registers
11-23
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1
11-24
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
11-25
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
11-26
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1
11-27
1
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1
Reset = 0x0001
11-28
Reset = 0x0002
1
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1
11-29
1
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1
Reset = 0x0001
11-30
1
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1
Reset = 0x0002
11-31
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1
Reset = 0x0000 0000
11-32
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1
Reset = 0x0000 0000
11-33
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1
Reset = 0x0000
11-34
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1
Reset = 0x0000
11-35
DMA_DONE (DMA Completion Interrupt Status) – W1C 0 – No interrupt is being asserted for this channel 1 – DMA transfer has completed, and this DMA channel’s interrupt is being asserted
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1
Reset = 0x0000 DMA_ERR (DMA Error Interrupt Status) – W1C 0 – No DMA error has occured 1 – A DMA error has occured, and the global DMA error interrupt is being asserted. DFETCH (DMA Descriptor Fetch) – RO This bit is set to 1 automatically when the DMA_CONFIG register is written with FLOW = 0x4 – 0x7 0 – This DMA channel is disabled, or it is enabled but stopped 1 – This DMA channel is enabled and presently fetching a DMA descriptor DMA_RUN (DMA Channel Running) – RO This bit is set to 1 automatically when the DMA_CONFIG register is written 0 – This DMA channel is disabled, or it is enabled but paused 1 – This DMA channel is enabled and
a DMA descriptor
11-36
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
DAB_TRAFFIC_PERIOD[2:0] 000 = No DAB bus transfer grouping performed Other = Preferred length of unidirectional bursts on the DAB bus between the DMA and the peripherals. MDMA_ROUND_ROBIN_PERIOD[4:0]
not zero, any MDMA stream which receives a grant is allowed up to that number of DMA transfers, to the exclusion of the other MDMA streams. DCB_TRAFFIC_PERIOD[3:0] 000 = No DCB bus transfer grouping performed Other = Preferred length of unidirectional bursts on the DCB bus between the DMA and internal L1 memory DEB_TRAFFIC_PERIOD[3:0] 000 = No DEB bus transfer grouping performed Other = Preferred length of unidirectional bursts on the DEB bus between the DMA and external memory.
11-37
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
DAB_TRAFFIC_COUNT[2:0] Current cycle count remaining in the DAB traffic period MDMA_ROUND_ROBIN_COUNT[4:0] Current cycle count remaining in the MDMA round robin period DCB_TRAFFIC_COUNT[3:0] Current cycle count remaining in the DCB traffic period DEB_TRAFFIC_COUNT[3:0] Current cycle count remaining in the DEB traffic period