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.

Mcasp can't work normally in arm when engine_open() is called to start DSP

Other Parts Discussed in Thread: AM3359

Dear all:

    I use mcasp to transfer voice data by EDMA  in ARM, and use DSP to implement other function. First, the mcasp run in arm to transfer data. Then, the syslink.ko  is loaded.The result is that tx stop TXEVT interrupt  and RXEVT interrupt  is normal but rx data is error.

   I modify the  "edma_alloc_channel(tx_channel, NULL,NULL,EVENTQ_DEFAULT);"  to "edma_alloc_channel(tx_channel, NULL,NULL,EVENTQ_0);", then  the tx and rx voice data  is  good.  Then calling  engine_open()  to start DSP  result in that tx data is good but rx data is  same  wrong.  

   Firstly, syslink.ko and cmemk.ko is loaded. Secondly, engine_open() is called.  The mcasp run last.  In this case, the mcasp will  work good  and  any modification  is unnecessary. 

 

 

 

Thanks

 

  • Gold,

    We have an engineer reviewing this and should get back to you soon.

    Dave

  • What version of SysLink are you using?  Can you clarify what you mean by "rx data is error"?

    Chris

  • Chris:

         The  Syslink  issue  have been resolved. But  the  engine_open()  still  effect  the McASP.  I  thought  that  engine_open()  may  write  the McASP registers  or  EDMA, but  now  the hard disk  read/write  also  effect  the  McASP. They  result  that   overrun or underrun error  of  McASP.

       SDK  is  EZSDK-5.02 and PSP is linux-2.6.37-psp04.00.00.12. The platform is CA8168.

       I  write  the Mcasp  driver according to the davinci-pcm.c.  The mcasp  run in arm  by EDMA.  I  use  TDM  format, 8 bits samples, 32 slots.

       In the begining, the mcasp work good.  The overrun or underrun occur  when hard disk read/write large block data.  The voice  become noise.

       No EDMA error occur, only overrun/underrun  error  occur.

      I modify the priority  of  EDMA  queue, but it  has no effect.

      The hard  disk read/write not by EDMA.  I wonder that hard disk can effect mcasp.

      I suspect some kind of race condition is resulting in underrun/overrun  error, but  I am not able to pin point the root cause.

     

     

    Thanks

  • hello,

    i use am3359 and sys/bios.

    i use mcasp to transmiter non audio data , i use edma to sevice the mcasp.

    i configure mcasp in burst mode with fifo enable.

    the edma was set up to send 256bytes ,after that the param was link to a dummy param.

    my problem is that i can only send the first 256bytes, next time when i want to send another 256 bytes,it fails.

    i sees that the the next time the afifo in mcasp did not send dma request to edma, so it fails.

    i also make a test , when i configure the edma to link to another param after the first 256 bytes, keep the mcasp afifo not empty, the mcasp works fine.

    should i always makes the mcasp afifo not empty??