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.

McASP data format

Other Parts Discussed in Thread: CCSTUDIO, OMAP-L137

I'm using OMAP-L137.  And use the sample code C:\CCStudio_v3.3\boards\evmomapl137_v1\dsp\tests\aic3106

Below sample code should set RFMT as  :

RROT = 0

RRVRS = 1

//****  Sample Code *****//

/* RX */
mcasp->regs->RMASK = 0xffffffff; // No padding used
mcasp->regs->RFMT = 0x00008078; // MSB 16bit, 1-delay, no pad, CFGBus
mcasp->regs->AFSRCTL = 0x00000112; // 2TDM, 1bit Rising, INTERNAL FS, word
mcasp->regs->ACLKRCTL = 0x000000AF; // Rising INTERNAL CLK,(from tx side)
mcasp->regs->AHCLKRCTL = 0x00000000; // INT CLK (from tx side)
mcasp->regs->RTDM = 0x00000003; // Slots 0,1
mcasp->regs->RINTCTL = 0x00000000; // Not used
mcasp->regs->RCLKCHK = 0x00FF0008; // 255-MAX 0-MIN, div-by-256

According to  TMS320C6000 DSP Multichannel Audio Serial Port (McASP) spru041j.pdf

The receive data format should be Table 3-3 , (f)

I check the data of  MCASP1_RBUF0_32BIT  (Sample code show how to get data)

The pad bit are not "0" 

//****  Sample Code *****//

for ( sec = 0 ; sec < 1000 ; sec++ ){
for ( msec = 0 ; msec < 1000 ; msec++ ){
for ( sample = 0 ; sample < 48 ; sample++ ){

/* Read then write the Right sample */
while ( ! ( MCASP1_SRCTL0 & 0x20 ) );
data = MCASP1_RBUF0_32BIT;

}}}

Left column is the value of MCASP1_RBUF0_32BIT

I transform Hex to Binary. And check the binary data.

Bit 0~15 are not fixed in "0" value.

Why?  Is there problem in sample code?  Or pad bit won't be in fixed value?

Thanks for any advise : )

  • Hi Hakeen,

    Thanks for your post.

    Basically, We can choose to select the pad value for the digits/bits which needs to be masked/not significant and generally, pad value can be either of any one of the significant digits a fixed value of 0, or a fixed value of 1.

    To be specific, the receive format unit bit mask register (RMASK) decides which bits of received data needs to be masked and padded with a specific known value. Bit pad value will be selected based out of RPAD and RPBIT bits in RFMT.

    Please refer RPAD and RPBIT bitfields in RFMT (Section 4.16 and refer Table 4-17 in the C6000 DSP McASP reference guide (spru041j.pdf)

    http://www.ti.com/lit/ug/spru041j/spru041j.pdf

     

    Thanks & regards,

    Sivaraj K

    ------------------------------------------------------------------------------------------------------- 
    Please click the Verify Answer button on this post if it answers your question.
    --------------------------------------------------------------------------------------------------------

  • Thanks! Sivaraj


    It's because  RMASK = 0xffffffff

    So, PAD is not enabled.  Got it.  Thx!