s3c6410 DMA implementation (entry level)

Publisher:meilidaowlLatest update time:2016-08-13 Source: eefocusKeywords:s3c6410  DMA Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
char src[200] = "abcdefghigklmn123456\n";

 char dest[200] = "kkkk\n";

void dma_init(void)
{
 DMACConfiguration = 1; //Enable the overall DMA
 DMACC7SrcAddr = (int)src; //Assign the source address to the source address register
 DMACC7DestAddr = (int)dest; //Assign the destination address to the destination address register
 DMACC7Control0 = 0x0c000000; //Set [26] [27] to 1, so that the source address and destination address are incremented after sending
 DMACC7Control1 = 0x64; //Write the size of the copy;
 DMACC7Configuration |= 1<<0; //Open channel7 DMA 
}

main()

{

dma_init();
 delay();
 my_puts("----------------\n");
 my_puts(src);
 my_puts(dest);

}

The src and dest contents printed out later are the same

Programming steps for operating DMA in the 6410 manual:

Steps to program a DMA channel: 

1. Decide whether use secure DMAC(SDMAC) or general DMAC(DMAC). In order to use general DMAC,

disable secure DMA control register(SDMA_SEL) of system controller. (Reset value is SDMAC)

 

2. Select a free DMA channel with the priority needed. Where DMA channel 0 has the highest priority and DMA   

channel 7 the lowest priority.  

 

DMACCXCONFIGURATION

DMACC7Configuration [0] bit value 1

 

3. Clear any pending interrupts on the channel to be used by writing to the DMACIntTCClr and DMACIntErrClr

registers. The previous channel operation might have left interrupts active.

4. Write the source address into the DMACCxSrcAddr register.

5. Write the destination address into the DMACCxDestAddr register.

 

6. Write the address of the next LLI into the DMACCxLLI register. If the transfer comprises of a single packet of

data then must be written into this register.

 

Offset Contents

Next LLI address Source Address for next transfer

Next LLI address + 0x04 Destination Address for next transfer

Next LLI address + 0x08 Next LLI address for next transfer

Next LLI address + 0x0C DMACCxControl0 data for next transfer

Next LLI address + 0x10 DMACCxControl1 data for next transfer

 

7. Write the control information into the DMACCxControl register.

 

DMACCxControl0

DMACCxControl1         transfer size

8. Write the channel configuration information into the DMACCxConfiguration register. If the Enable bit is set

then the DMA channel is automatically enabled.

Keywords:s3c6410  DMA Reference address:s3c6410 DMA implementation (entry level)

Previous article:LPC2114 startup code analysis
Next article:Implementation of s3c6410 timer interrupt

Recommended ReadingLatest update time:2024-11-23 12:21

Detailed explanation of STM32 DMA usage
The DMA part I used is relatively simple. Of course, maybe this is a new thing, and I can't use its complex functions for the time being. The following is a question and answer format to express my thoughts. What is DMA used for?        Direct memory access is used to provide high-speed data transfer between periphera
[Microcontroller]
Detailed explanation of STM32 DMA usage
Scatter/Gather DMA for Embedded Systems with PCIe
The demands of the new generation of interconnection continue to put pressure on software and hardware design. Increasing quality of service (QoS), data channel isolation, data smooth recovery and integrity are all indicators worth considering. PCIe is an interconnection technology that can meet the above requiremen
[Analog Electronics]
Scatter/Gather DMA for Embedded Systems with PCIe
STM32 study notes DMA transmission
1. Introduction to DMA 1. Introduction to DMA DMA (Direct Memory Access) is a data transfer method that can greatly reduce the CPU workload. The CPU has many functions such as transferring data, computing, and controlling program transfer, but in fact, data transfer (especially large amounts of data transfer) does
[Microcontroller]
STM32 study notes DMA transmission
16.6410DMA Brief Introduction
1. Why do we need DMA? First, let's look at the serial port to transmit information: sending strings. Send function: Add the following send function in uart.c: Next call in main.c: Compile make, Burn to the development board: Make an SD card, set the de
[Microcontroller]
16.6410DMA Brief Introduction
s3c6410 bare metal program (1)
In fact, I had almost no experience with embedded systems before. I only learned 8-bit microcontrollers, which were simple things! Then I learned assembly language programming and C language for 8086 and 80386, as well as Windows graphical interface programs. So when I got this Feiling OK6410 development board, I fe
[Microcontroller]
s3c6410 bare metal program (1)
s3c6410 memory map
         1. Boot image area 0x0000_0000~0x07FF_FFFF          2. Internal storage area                  (1) Internal ROM 0x0800_0000~0x0BFF_FFFF                 (2) Internal SRAM 0x0C00_0000~0x0FFF_FFFF          3. Static storage area 0x1000_0000~0x3FFF_FFFF          4. Dynamic storage area 0x4000_0000~0x6FFF_F
[Microcontroller]
S3C6410 naked LED
  Recently I took out the Tiny6410 development board which had been idle for a long time to play with. I have always had a perverted admiration for Linux, so this time I abandoned the IDE development environment such as ADS1.2 or RVDS without any suspense. I used VIM + GCC to handle everything.   To be brief, put the
[Microcontroller]
S3C6410 naked LED
Using DMA in STM32 to generate and capture square waves
1 Introduction to STM32 Microcontrollers The STM32 series microcontrollers are highly integrated microcontrollers based on the Cortex-M3 core from ST. It sets a new benchmark in terms of performance, price, power consumption and real-time performance. It integrates the Cortex-M3 core, as well as a rich set of pe
[Microcontroller]
Using DMA in STM32 to generate and capture square waves
Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号