AnsweredAssumed Answered

BF-533 SPORT continous transmission and buffer refill

Question asked by leni on Jan 13, 2016
Latest reply on Feb 4, 2016 by Jithul_Janardhanan



I am trying with the BF-533 EZ-Kit to set up a transmission via SPORT interface.

The transmission should be continous but the data to be transmitted needs to be calculated as we go along. Therefore I need to refill the buffers once they are send. So, I need to realize a ping pong scheme on one side filling the buffers on the others sending them via SPORT.


What I already did:

I filled two buffers, submitted them to SPORT and they are send.

I tried to use callbacks at the end of each buffer transmission and I tried to use DMA. Both works for at least the first transmission.

So I tried setting a flag in the interrupt, and put a while loop to wait for this flag to be set while SPORT is transmitting. But I never get there as the buffers seem to be transmitted at once (After enabling SPORT I run into the interrupt that the first buffer is transmitted, then I go directly to the interrupt again telling me the second buffer is processed, never reaching the while{transmissionNotComplete} loop).


Question: I need to refill the buffers once they are send, which is the best way to do this while ensuring continous transmission for SPORT?

Because I assume filling the buffer in an callback will take to long to guarantee continous transmission as the SPORT FIFO might be emptied faster then I can refill the buffer.

But I don't see a chance to do it outside a buffer, as there is no code executed before the buffers are processed.

Did I misunderstand something?


Thanks for your help,



PS: I am using CrossCore Embedded Studio but I looked at the talkthrough examples in the VisualDSP folders which did not really help me, as they always have RX and TX SPORT and I think I only need TX. Or do I need RX to get data to SPORT anyhow?