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.

configure multi channel McBSP

Hi,

 

 I will need to connect two codec to McBSP0 on C5410A DSP. I am confused by number of channels and number of time slots when data size is not 8 bits. since 16 bit data will take two 8 bit time slots of the TDM bus. I wonder when I want to enable a 16 bit channles, I should enable two time slots or just the first one?

For instance,

 
>
> if XMCM =01,PHASE=0, XFRLEN =0, XWDLEN =010b, and I want to enable a 16 bit
> channel, say channel 1, I should set XCERA = 3(enable time slot 0 and 1)
> or just set XCERA = 1 ?

Thanks in advance.

Ron
  • Hi Rong,

    Basically each channel has its own 'n' number of time slots and each time slot can be configured for 8 bit, 16 bit .... 32 bit depending on the McBSP (refer McBSP data sheet). So my suggestion would be to configure the XWDLEN in such a way that each slot is of 16 bit.

    Let me know the result.

    Thanks and Regards,

    Sandeep K

  • Hi Sandeep,

     

    Thank you very much for your reply!

     

    As you see from my configuration, I did set word size to 16 bits, number of frame to 8, and in RECRA and XCERA, I enabled two 8 bits time slot for each 16 bits channel. for instance, I set  RECA0  and RECA1 for my first 16 bits channel 0. To enable 16 bits channel 0, I should set both of RECA0 and RECA1 or just RECA0?  I actually tried both, none of them works.

    If I use ulaw companding in both McBSP0 and codec, it works well. but if I use 16 bit linear data, it did not work. To use 16 bit linear data, the changes I made is:

    • configured codec to 16 bits data size, and receive/send data at time slot 0,2,4,6,8,10,12,14( the codec is Zarlink's Le58QL02FJC).
    • in McBSP, I changed word size to 16 bits, no companding with MSB first, number of word per frame is still 7(channel 3 is not used). In RECA and XCERA, I set two slots for one channel.
    • the FSR and FSX from external(from FPGA) at 8kHz.

      My another question is:  does it really matter for number of words per frame as long as the number is more than the number of actually channels used since the FSR/FSX is fixed.  In my case, I set  number of word per frame to 8. I mean if I set number of word per frame to any number between 8 and 16, it should work as well?

    Thanks,

     

    Ron

  • Solved.

    Realized that just need to set one RECAn and XCEAn regardless of the size of word. after this correction. it works.

     

    Thanks,

     

    Ron