s3c6410 DMA 实现(入门级)
来源:互联网 发布:男生衣服搭配软件 编辑:程序博客网 时间:2024/06/06 05:57
char src[200] = "abcdefghigklmn123456\n";
char dest[200] = "kkkk\n";
void dma_init(void)
{
DMACConfiguration = 1; //开总的DMA 使能
DMACC7SrcAddr = (int)src; //给源地址寄存器赋源地址
DMACC7DestAddr = (int)dest;//给目标地址寄存器赋目的地址
DMACC7Control0 = 0x0c000000; //【26】【27】位置1,使源地址和目标地址在发送后递增
DMACC7Control1 = 0x64; //写入拷贝的size;
DMACC7Configuration |= 1<<0; //开channel7 DMA
}
main()
{
dma_init();
delay();
my_puts("----------------\n");
my_puts(src);
my_puts(dest);
}
之后打印出的src和dest内容相同
6410手册中操作DMA的编程步骤:
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】位值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.
- s3c6410 DMA 实现(入门级)
- DMA机制(基于S3C6410)
- dma s3c6410
- s3c6410 DMA
- AC97之DMA(s3c6410)
- s3c6410 DMA驱动分析
- S3C6410 裸机DMA
- S3C6410-DMA裸机编程
- S3C6410移植DMA的一点经验总结[bootloader级]
- S3C6410--DMA裸机开发实例
- s3c6410 linux DMA驱动分析
- s3c6410 linux DMA驱动分析
- S3C6410--DMA裸机开发实例
- ARM11 S3C6410 硬件浮点(VFP)实现
- uart dma实现方式分析(转载)
- 五、DMA入门使用
- 自娱自乐10之Linux DMA使用2(DMA使用实例,用timer作DMA请求源实现流水灯)
- STM32入门学习之DMA(STM32F030F4P6基于CooCox IDE)
- s3c6410 s3c2440串口发送接收数据的实现(轮询)及相关寄存器
- 函数指针 往指定内存中写数据
- 2440 Xmodem协议传送文件的简单实现
- s3c6410 的外部中断实现
- s3c6410 定时器中断的实现
- s3c6410 DMA 实现(入门级)
- 看第一句时已然被打动!......
- iphone中的UITouch
- C 语言常见面试题
- 【DFS(记忆化)】poj 1351 Number of Locks
- 用getaddrinfo()函数,通过主机名获得ipv6和ipv4的地址
- 【引用】cmd下网络配置命令
- windows 下socket 编程
- 简单网络管理协议(SNMP)