4.DMA内存访问测试
该教程演示如何通过开发板实现DMA内存访问
一、准备工作
- 准备1块BearPi-Pico H2821开发板
二、编译代码
在Windows下编译操作
点击左侧的“KConfig”,打开配置界面.
选择Support DMA Sample.
Application ---> [*] Enable Sample. [*] Enable the Sample of peripheral. [ ] Enable all the sample of peripheral, it's just for build. [ ] Support ADC Sample. [ ] Support BLINKY Sample. [ ] Support BUTTON Sample. [*] Support DMA Sample. DMA Sample Configuration --->
按下"Save"键保存配置。
编译烧录固件
参考环境搭建教程编译烧录代码
在Ubuntu下编译操作
在MobaXterm中输入:
./build.py menuconfig
选择Support DMA Sample.
Application ---> [*] Enable Sample. [*] Enable the Sample of peripheral. [ ] Enable all the sample of peripheral, it's just for build. [ ] Support ADC Sample. [ ] Support BLINKY Sample. [ ] Support BUTTON Sample. [*] Support DMA Sample. DMA Sample Configuration --->
按下"ESC"键退出并保存配置。
编译烧录固件
参考环境搭建教程编译烧录代码
三、测试
烧录固件后按下开发的复位按键,观察开发板的运行日志。
dma single memory transfer start!
dma single memory transfer succ!
dma checking transfer from 0x00048e88 to 0x00048e08...
dma memory copy test succ, length = 32 block
dma single memory transfer start!
dma single memory transfer succ!
dma checking transfer from 0x00048e88 to 0x00048e08...
dma memory copy test succ, length = 32 block
dma single memory transfer start!
dma single memory transfer succ!
dma checking transfer from 0x00048e88 to 0x00048e08...
dma memory copy test succ, length = 32 block
dma single memory transfer start!
dma single memory transfer succ!
dma checking transfer from 0x00048e88 to 0x00048e08...
dma memory copy test succ, length = 32 block
dma single memory transfer start!
dma single memory transfer succ!
dma checking transfer from 0x00048e88 to 0x00048e08...
dma memory copy test succ, length = 32 block