const unsigned char DMAUART0data[]={"
Test DMA success!"}; unsigned char output[]={"123456789012334werer5450"}; void Main(void) { rSYSCFG=CACHECFG; // Using 8KB Cache// Port_Init(); //初始化IO Uart_Printf("
测试 DMA
"); //设置DMA for M2M rBDISRC0=(0x00<<30)|(0x01<<28)|((ULONG)DMAUART0data); //设定输入地址和单位数据长度 rBDIDES0=(0x00<<30)|(0x01<<28)|((ULONG)output ); rBDICNT0=(0x00<<30)|(0x01<<20)|(0x01<<26)|(sizeof(DMAUART0data)); rBDCON0=0x01; //启动传输 Uart_Printf("
测试 DMA 等待
"); Uart_Printf("
测试 DMA 等待
"); Uart_Printf("
测试 DMA 等待
"); Uart_Printf("%s",DMAUART0data); Uart_Printf("%s",output); while(1); }
打印结果还是 Test DMA success! 123456789012334werer5450 |