阅读:1710回复:1
plx dma问题
现dma传输8位可行,但16位传输有问题。偶数地址能正常传送,奇数地址始终失效
DmaDesc1.EnableReadyInput = 1; DmaDesc1.DmaStopTransferMode = AssertBLAST; DmaDesc1.DmaChannelPriority = Rotational; DmaDesc1.IopBusWidth = 2; // 16-bit bus rc1=PlxDmaSglChannelOpen(hDevice,PrimaryPciChannel0,&DmaDesc1); if (rc1 != ApiSuccess) { // ERROR – Unable to open DMA channel PlxPrintf("\nOPEN ERR"); } DmaData1.u.UserVa = (U32)PciBuffer1; DmaData1.LocalAddr = 0x0; DmaData1.TransferCount = sizeof(PciBuffer1); DmaData1.LocalToPciDma = 0; PlxDmaSglTransfer(hDevice,PrimaryPciChannel0,&DmaData1,FALSE); 想请教大侠,除了设置DmaDesc1.IopBusWidth = 2; 以外,还有什么需注意的? |
|
沙发#
发布于:2009-08-20 17:53
DMA传输与内存边界有关,需要仔细检查一下。地址最低两位应该为00才对吧。
|
|
|