For the new SPORT external memory functionality, when writing
tests which involve the PCI bit, the external memory address should
be split before writing to the chain pointer register.
上面是关于SPORT中的chained DMA的Chain Pointer Register的使用说明。但是在ADI提供例程中却没有将地址分离开来就赋值入寄存器了,具体见下面例程
| rcv1a_tcb[4] = *pCPSP1A = ((int) rcv1a_tcb + 7) & 0x7FFFF | (1<<19); |
| rcv1b_tcb[4] = *pCPSP1B = ((int) rcv1b_tcb + 7) & 0x7FFFF | (1<<19); |
| rcv3a_tcb[4] = *pCPSP3A = ((int) rcv3a_tcb + 7) & 0x7FFFF | (1<<19); |
| rcv3b_tcb[4] = *pCPSP3B = ((int) rcv3b_tcb + 7) & 0x7FFFF | (1<<19); |
| xmit0a_tcb[4] = *pCPSP0A = ((int) xmit0a_tcb + 7) & 0x7FFFF | (1<<19); |
| xmit0b_tcb[4] = *pCPSP0B = ((int) xmit0b_tcb + 7) & 0x7FFFF | (1<<19); |
|
|
| xmit2a_tcb[4] = *pCPSP2A = ((int) xmit2a_tcb + 7) & 0x7FFFF | (1<<19); |
| xmit2b_tcb[4] = *pCPSP2B = ((int) xmit2b_tcb + 7) & 0x7FFFF | (1<<19); |
|
对于这个问题感到很困惑,文档中写的跟例程中不一样,所以不知道各位有没有配置chained DMA的经验讨论一下。其实例程也不稳定,有时会出不来声音,或者是声音失真,出现噪音等问题。