AnsweredAssumed Answered

ADSP-21489 Serial data communication using SPORT

Question asked by MarcZ on Mar 29, 2017
Latest reply on May 31, 2017 by Jithul_Janardhanan

Hi everyone,

 

We need to support the serial data protocol shown in the diagram attached.

 

The clock signal is 2 MHz and there are 20 bits of data communicated per frame, providing 100kHz of samples communicated per second.

As you can see from the diagram, there are two channels of serial data communicated, along with a single Clock line and single Sync line.

All signals come from outside the processor, and so the processor will be configured as a receiver. We want to use one of the SPORTs to receive data sent by this protocol, and we are wondering if you coudl sketch out the code necessary to do so?

 

We'd like to use DAI 11 for Channel A data, DAI 12 for Channel B data, DAI 19 for the Clock, and DAI 20 for Sync.

I suppose we'd need to use SRU-related command to route these DAI lines into one of the SPORTS.

Then I suppoose we need to configure the SPORT control registers to enable Standard Serial mode, as a Slave Receiver. Then we'd need to setup DMA such that when the SPORT recieves the data, it will automatically trandfer it to memory for us. The processor will be monitoring the single memory address wehre samples come in, so we do not need DMA to automatically increment and put samples into a buffer having any real dimension.

 

By the way, our "main loop" executes many times faster than the sample rate, so we do not plan on using any interrupts. And grabbing data from the same sample multiple times is also not a problem.

 

It is not clear to me whether we need early or late frame sync.

 

Could you give some feedback given the diagram above? Could sketch out the code necessary to setup a SPORT for receiving such a protocol?

 

Thank you very much!

 

Serial data protocol

Outcomes