|  | 
 
| 最近调试mcbsp接口,接收数据总是出问题,fpga每隔一定时间给我发一组数据,情况如下: (1)接收数据本身没有问题,即单个数据没有问题,所以应该不是接口时钟的问题。
 (2)当接收的字节BUFSIZE比较小时,没有问题
 (3)当接收的字节BUFSIZE比较大时,有问题,问题如下:
 发现输出的数据发生了平移,即数据不是发送来的第一个字节开始接收的,从中间某个字节开始接收,然后也能够输出BUFSIZE个完整数据且顺序是对的,不知道问题出在了哪里,谢谢指导,这是关于mcbsp接收部分的代码。
 Semaphore_pend(sem_fpgaRcv,BIOS_WAIT_FOREVER);
 status = GIO_reclaim(mcbspRxHandle, (Ptr *) &rcv, NULL, NULL);
 if (IOM_COMPLETED != status)
 {
 System_printf("Error reclaiming full buffer from the streams\r\n");
 }
 else
 {
 EthPacket_send = (struct Eth_Queue_send*) Memory_alloc(hmEth_send,
 sizeof(struct Eth_Queue_send), 0, &eb);  //
 
 EthPacket_send->data=rcv;    //McbspQueue->fpgaXmt.Data;
 EthPacket_send->length=864;
 EthPacket_send->destaddr.sin_port = htons(AUDIO_PORT);//测试用使用audio端口,正常的话消息类型应该从协议里获取
 Queue_put(queueEth_send, &EthPacket_send->link);
 }
 //Task_sleep(100);
 /* issue the received data to the output stream   */
 if (IOM_PENDING != GIO_issue(mcbspRxHandle, rcv, BUFSIZE, NULL))
 {
 System_printf("Error issuing buffer to the stream\r\n");
 }
 
 
 最后我想问一下,从mcbsp接口接收的数据,是怎么存储的?
 
 
 | 
 |