测试环境
硬件
- 开发板
软件
- PC端的串口中断软件,用于PC和开发板进行串口通信
- Luban-Lite 自带的test-dma 工具
软件配置
test-dma
在 Luban-Lite 根目录下执行 scons --menuconfig
,进入menuconfig的功能配置界面,按如下选择:
Drivers options --->
Drivers examples --->
[*] Enable DMA driver test command
1
2
3
2
3
INFO
test-dma 只限于测试 Mem To Mem 的数据传输操作。
test-dma 测试
test-dma提供了两个测试命令: - test_dma_memcpy:测试DMA控制器的Men to Men的copy操作 - test_dma_memset:测试DMA控制器的memset功能
aic /> test_dma_memcpy 512
DMA memcpy test: src = 0x40d8f100, dest = 0x40d8f380, len = 0x200
DMA complete, callback....
DMA test succeed!
DMA memcpy 512 bytes, speed 0.08 MB/s
aic />
aic /> dma_dump 0
DMA Ch0: desc = 0x0
Common register:
IRQ_EN 0x4, IRQ_STA 0x0, CH_STA 0x0, GATE 0x0
Ch0 register:
Enable 0x0, Mode 0x0, Pause 0x0
Task 0xfffff800, Config 0x4c004c0, Src 0x40d8f304, Sink 0x40d8f584
Left 0x0, Package_cnt 1
aic />
aic /> test_dma_memcpy 51200
DMA memcpy test: src = 0x40d8f100, dest = 0x40d9b980, len = 0xc800
DMA complete, callback....
DMA test succeed!
DMA memcpy 51200 bytes, speed 8.14 MB/s
aic /> test_dma_memcpy 512000
DMA memcpy test: src = 0x40d8f100, dest = 0x40e0c180, len = 0x7d000
DMA complete, callback....
DMA test succeed!
DMA memcpy 512000 bytes, speed 69.75 MB/s
aic />
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26