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.
Previous article:LPC2114 startup code analysis
Next article:Implementation of s3c6410 timer interrupt
Recommended ReadingLatest update time:2024-11-23 12:21
- Popular Resources
- Popular amplifiers
- Microcomputer Principles and Interface Technology 3rd Edition (Zhou Mingde, Zhang Xiaoxia, Lan Fangpeng)
- Automotive Electronics S32K Series Microcontrollers: Based on ARM Cortex-M4F Core
- LPC1700 Chapter 31 General Purpose DMA
- ARM Cortex-M4+Wi-Fi MCU Application Guide (Embedded Technology and Application Series) (Guo Shujun)
- Naxin Micro and Xinxian jointly launched the NS800RT series of real-time control MCUs
- How to learn embedded systems based on ARM platform
- Summary of jffs2_scan_eraseblock issues
- Application of SPCOMM Control in Serial Communication of Delphi7.0
- Using TComm component to realize serial communication in Delphi environment
- Bar chart code for embedded development practices
- Embedded Development Learning (10)
- Embedded Development Learning (8)
- Embedded Development Learning (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Intel promotes AI with multi-dimensional efforts in technology, application, and ecology
- ChinaJoy Qualcomm Snapdragon Theme Pavilion takes you to experience the new changes in digital entertainment in the 5G era
- Infineon's latest generation IGBT technology platform enables precise control of speed and position
- Two test methods for LED lighting life
- Don't Let Lightning Induced Surges Scare You
- Application of brushless motor controller ML4425/4426
- Easy identification of LED power supply quality
- World's first integrated photovoltaic solar system completed in Israel
- Sliding window mean filter for avr microcontroller AD conversion
- What does call mean in the detailed explanation of ABB robot programming instructions?
- STMicroelectronics discloses its 2027-2028 financial model and path to achieve its 2030 goals
- 2024 China Automotive Charging and Battery Swapping Ecosystem Conference held in Taiyuan
- State-owned enterprises team up to invest in solid-state battery giant
- The evolution of electronic and electrical architecture is accelerating
- The first! National Automotive Chip Quality Inspection Center established
- BYD releases self-developed automotive chip using 4nm process, with a running score of up to 1.15 million
- GEODNET launches GEO-PULSE, a car GPS navigation device
- Should Chinese car companies develop their own high-computing chips?
- Infineon and Siemens combine embedded automotive software platform with microcontrollers to provide the necessary functions for next-generation SDVs
- Continental launches invisible biometric sensor display to monitor passengers' vital signs
- EEWORLD University Hall----Live Replay: Use dedicated IoT hardware and software solutions to start the journey from embedded to cloud
- RF GaN-on-Si: The Best of Both Worlds
- 1. [Record] Solve the copy and paste problem between Linux virtual machine and Windows on VMware
- Maxwell's Equations 3D Animation
- MCU: row and column keyboard scanning program
- Some issues with ob6572 chip
- [RVB2601 creative application development] hello world
- MicroPython further improves the file system
- Do you use cmake a lot in practice? Please share your thoughts on using it, having used it, or thinking of using it.
- EEWORLD University Hall----Industrial Robot Seminar