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.

OMAP-L138: McBSP - How to detect XEMPTY/Transmitter Underrun

Part Number: OMAP-L138

I'm planning to have the McBSP configured to transmit data using externally generated clocks and frame syncs and using the EDMA to write the data to the McBSP. I was hoping not to use the FIFO as I will periodically need to reconfigure the DMA and don't want "old" data in the FIFO. My concern is that if I'm transmitting data fast enough and for some reason the EDMA gets held up and can't write the next value in time, I'll get a transmit underrun on the McBSP. I realize that if this happens, the McBSP will just retransmit the previous data. What I'm looking for is a way to detect that this occurred. The closest thing I see is the XEMPTY flag but that only stays active until the next time the transmit data is written to the McBSP. Is there any way to detect that a transmit underrun occurred?

  • Hi David,

    Sorry for the delayed response. From looking at the TRM, it appears XEMPTY is the only flag available for detecting underflows/underruns. Could you help me understand why this flag isn't suitable for your application? 

    Regards,
    Sahin

  • I'm using the DMA controller to move the data to be transmitted to the McBSP. The data will be transmitted fairly rapidly and my concern is that something might occasionally hold off the DMA long enough that the new data doesn't get written to the transmitter in time to be transmitted, causing an underrun. My understanding is that the XEMPTY flag will clear itself as soon as the data gets written so there's no lasting indication that an underrun occurred. I don't think I should have any underruns in normal operation, but it would be nice to know that I'm not rather than just hoping I'm not.