I'm looking for some code sample to use SPORTS on TDM mode. Is there some code available for starting point?
Here is the screenshot of the code executed in core mode, with a breakpoint at the end of the transfer.
The first read is always 0x1FFFFFFF.
Please see the attached zip file. I have tested this code sometime back on the EZ-KIT. You can use this as reference.
Thanks of lot Jeyanthi for your quick answer..
I'll try it right now.
That works fine!
One more thing. I do have to add a dummy read on first RX ISR. I suppose, reading the HRM that is normal.
One last question, I use DMA in I2S now. I just want to move your example in DMA mode.
Do i just have to move your TDM setting into the Talkthu example?
The zip file I had sent has the sample code for both core mode and DMA modes. You can use the DMA mode code and test. Please let me know on where you had to add the dummy read.
For updating the Talkthru example code, you may need to change the CODEC configuration as well. In the current setup the CODEC may send/receive data in I2S mode. You may need to change it to send in TDM mode.
The modified code fwith the dummy read on first RX interrupt;
void Receive_isr(int dummy)
dummy=*pRXSP1A; // Dummy read on first RX
dest[rx_count++ ] = *pRXSP1A;
if( rx_count >= 8 )
/* BlockCount++; // Cont transmit for PIN control
*pSPCTL1 = 0;
*pSPMCTL1 = 0;
*pSPCTL0 = 0;
*pSPMCTL0 = 0;
Sorry for the DMA sample, I checked only the first one.
The core mode code should work fine without the dummy read. What is the data received in the dummy read portion? Can you share me the VDSP++ screenshots with running the code without modifying it?
And by the way, your DMA TDM sample code works perfectly with the AD1835.
Thanks a lot.
I also rechecked the core mode code. I see the same behavior. I think that the reason for the behavior is that in multichannel mode the frame sync is level sensitive. As soon as the receiver is enabled if the frame sync is in active level then it starts shifting in the data. You can add a dummy read to ignore the first data.
Good to know that the DMA mode works fine.
Ok, I understand.
Thanks for your help.
Retrieving data ...