This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

sysbios下upp接收数据的问题



OMAPL138开发板上ARM控制DSP采集数据,然后DSP再将数据回传给ARM。DSP的采集数据是通过upp接口接收FPGA的数据(0-65535循环发送)。我做了这样一个工作并且实现了数据回传的功能,但是现在的问题是有些帧数据没有更新。ARM端打印每一帧最后一个数据如下(一帧大小8192):

samples[8191]=8097.000000     (很奇怪)
samples[8191]=19489.000000
samples[8191]=27681.000000
samples[8191]=35873.000000
samples[8191]=27681.000000   (没更新)
samples[8191]=52257.000000
samples[8191]=27681.000000   (没更新)
samples[8191]=3105.000000
samples[8191]=27681.000000   (没更新)
samples[8191]=19489.000000
samples[8191]=27681.000000   (没更新)
samples[8191]=35873.000000

在接收数据是我用乒乓的原理,如下:

 LOG_INFO("invalid cache");

Cache_inv(upp_buffer_ping, sizeof(upp_buffer_ping), Cache_Type_ALLD, TRUE);
LOG_INFO("DMA 1");
upp_reg_hdl->UPID0 = (Uint32)upp_buffer_ping;
upp_reg_hdl->UPID1 = ((Uint32)upp_line_count << 16) | (Uint32)upp_line_size*sizeof(unsigned short);
upp_reg_hdl->UPID2 = (Uint32)upp_line_offset*sizeof(unsigned short);

while(upprecv_interrupt_count == 0);

Cache_inv(upp_buffer_pong, sizeof(upp_buffer_pong), Cache_Type_ALLD, TRUE);
 LOG_INFO("DMA 2");
upp_reg_hdl->UPID0 = (Uint32)upp_buffer_pong;
upp_reg_hdl->UPID1 = ((Uint32)upp_line_count << 16) | (Uint32)upp_line_size*sizeof(unsigned short);
upp_reg_hdl->UPID2 = (Uint32)upp_line_offset*sizeof(unsigned short);

while(upprecv_interrupt_count == 0);

每次接收完数据会进入一个硬件中断,但是实际执行的时候只有ping进入中断,pong数组并没有进入中断。

个人觉得数据没有更新是这个原因,不知道对不对,该怎样解决?