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.

OMAP35x McBSP2 as slave (stereo)

Hello!

I have connected my DSP (with a digital mic) via the I2S protocol using the McBSP2 driver on WinCE 6.0 RC3.

My problem is that when I use wavrec.exe I only record one channel out of two. From the right channel I hear crystal clear what I send from my DSP. From the other channel it is just trash.

I used an oscilloscope to prove that the data I send go to both channels.  I use a 50% duty cycle. I tried to change the polarity from the part of the DSP, nothing happend.

Here is the configuration of the driver:

; ### MCBSP configuration ###
    "LoopbackMode"=dword:0                              ; Either 0 (no loopback) or 1 (loopback)
    "WordsPerFrame"=dword:1                             ; Range 1-128 words
    "WordLength"=dword:20               ; Range 8, 12, 16, 20, 24, or 32 bits
    "WordLength2"=dword:20              ; Range 8, 12, 16, 20, 24, or 32 bits
    "WordsPerFrame"=dword:1             ; Range 1-128 words
    "TDMWordsPerFrame"=dword:4          ; (takes 3-1 words =>2 words) Range 1-128 words 
    "PartitionMode"=dword:0             ; 0-> 2-partition mode, 1-> 8-partition mode
    "NumOfTxChannels"=dword:4         ; Number of channels to be enabled
    ;in XCERA bit 0->L2 bit 1->L1 bit 2->R2 and bit 3->R1     
    "EnableMcBSPTxChannels"=multi_sz:"0","2","0","2"
    "NumOfRxChannels"=dword:4         ; Number of channels to be enabled
     ;in RCERA bit 0->L1 bit 1->L2 bit 2->R1 and bit 3->R2      
    "EnableMcBSPRxChannels"=multi_sz:"0","1","0","1"
    "DualPhase"=dword:1                 ; Either 0 (false) or 1 (true)
    "DataDelay"=dword:1                 ; Range 0, 1, or 2 bits
    "FrameSyncSourceTx"=dword:0         ; Range 0 (ext), 2 (int xmit), or 3 (int SRG)
    "PhaseTx"=dword:0                                   ; Either 0 (single) or 1 (dual)
    "ClockPolarityTx"=dword:0                           ; Either 0 (data driven on rising edge) or 1 (falling)
    "FrameSyncPolarityTx"=dword:0                       ; Either 0 (active high) or 1 (active low)
    "FifoThresholdTx"=dword:3FF                         ; Range 0-1023 words for McBsp2
    "ReverseModeRx"=dword:0                             ; Either 0 (MSB first) or 1 (LSB first)
    "DataDelayRx"=dword:1                               ; Range 0, 1, or 2 bits
    "ClockModeRx"=dword:0                               ; Either 0 (external) or 1 (internal)
    "FrameSyncSourceRx"=dword:0         ; Either 0 (external) or 1 (internal)
    "PhaseRx"=dword:0                                   ; Either 0 (single) or 1 (dual)
    "ClockPolarityRx"=dword:1                           ; Either 0 (data sampled on falling edge) or 1 (rising)
    "FrameSyncPolarityRx"=dword:0       ; Either 0 (active high) or 1 (active low)
    "ClockPolarityTx"=dword:1           ; Either 0 (data driven on rising edge) or 1 (falling)
    "ClockPolarityRx"=dword:1           ; Either 0 (data sampled on falling edge) or 1 (rising)
    "ClockSourceSrg"=dword:4            ; Range 0 (rising CLKS), 1, (falling CLKS) 2 (CPU), 3 (CLKRI), or 4 (CLKXI)
    "FrameWidthSrg"=dword:10            ; Range 1-256
    "ClockDividerSrg"=dword:0           ; Range 0-255
    "ClockResyncSrg"=dword:0            ; Either 0 (no resync) or 1 (resync)
    "CLKSPinSource"=dword:0                ; Either 0 (external) or 1 (internal)
    "JustificationMode"=dword:0         ; Range 0 (right, zero fill), 1 (right, sign fill), or 2 (left)

 

I think the problem is somewhere around here:

     ;in RCERA bit 0->L1 bit 1->L2 bit 2->R1 and bit 3->R2      
    "EnableMcBSPRxChannels"=multi_sz:"0","1","0","1"

But I haven't found any documentation on that so I don't understand what it really does.

Any ideas?

Thank you in advance!