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.

Problem about Mcasp in OMAP-L137

Other Parts Discussed in Thread: OMAP-L137

Dear all,

I am using the MCASP of OMAP-L137 to receive and transmit data from or to my codec(AK4620B). I chose the I2S protocol for my communication.

Now I am coding to directly read or write the XRBUF register of mcasp1.

My question is that the cpu can write the XRBUF only once. The second time , the XSTAT will tell me the XRBUF is written and full. I mean the XBUF is not automatically coped to XRSR as the document says :

"For transmit, the DSP services the McASP by writing data into the XBUF register, which is an alias of the XRBUF for transmit. The data automatically passes through the transmit format unit before actually reaching the XRBUF in the serializer. The data is then copied from XRBUF to XRSR, and shifted out from the AXR[n] synchronously to the serial clock."

What's more, the RBUF is always empty and can't read data from the AXRn pin I select.

I am confused. I programed  the code by following the OMAP-L137-EVM‘s AIC3106's test code.

 

  • Qinglin Meng said:

    My question is that the cpu can write the XRBUF only once. The second time , the XSTAT will tell me the XRBUF is written and full. I mean the XBUF is not automatically coped to XRSR as the document says.

    That's the correct behavior.  There are 2 registers:  XRSR and XRBUF.  The XRSR register holds the data that is currently being shifted out onto the pin.  The XRBUF (aka XBUF) register gives one extra level of buffering.  So once the data is finished being shifted ouf of XRSR then the data gets moved from XRBUF -> XSR and you get a new XRDY event/interrupt.

  • I am studying McASP and EDMA, some questions to ask you,woule you mind give me the e-mail??