AnsweredAssumed Answered

Question about TDM mode on sharc 21489

Question asked by Quiwi on Mar 16, 2015
Latest reply on Sep 22, 2015 by Harshit.Gaharwar

The project in "21489 AD1939 C Block-Based Talkthru 48 or 96 kHz" is for 4in and 8out, I want to convert it to 2in and 2out and have made the changes as follows:

 

 

in blockProcess_audio.c:

 

 

void process_audioBlocks()

{

  memcopy(fBlockA.Rx_L1, fBlockA.Tx_L1, NUM_SAMPLES);

  memcopy(fBlockA.Rx_R1, fBlockA.Tx_R1, NUM_SAMPLES);

}

 

 

void handleCodecData(unsigned int blockIndex)

{

    inputReady = 0;

 

 

    isProcessing = 1;

 

 

  floatData(fBlockA.Rx_L1, rx_block_pointer[blockIndex]+0, NUM_RX_SLOTS, NUM_SAMPLES);

  floatData(fBlockA.Rx_R1, rx_block_pointer[blockIndex]+1, NUM_RX_SLOTS, NUM_SAMPLES);

 

 

  process_audioBlocks();

 

 

  fixData(tx_block_pointer[blockIndex]+0, fBlockA.Tx_L1, NUM_TX_SLOTS, NUM_SAMPLES);

  fixData(tx_block_pointer[blockIndex]+1, fBlockA.Tx_R1, NUM_TX_SLOTS, NUM_SAMPLES);

    isProcessing = 0;

}

 

 

in init1939visSPI.c:

DACCTRL1: changed to DAC_CHANNELS_2

ADCCTRL2: changed to ADC_CHANNELS_2

 

 

in initSPORT01_TDM_mode.c:

NUM_RX_SLOTS and NUM_TX_SLOTS both changed to 2

*pSP1CS0 and *pSP0CS0  both changed to 0x00000003

*pSPMCTL0 and *pSPMCTL1 both changed to NCH1 | MFD1

 

 

 

 

After these changed took effect, a stereo signal was input to ADC 1 left and right. However, all the four DAC outputs have the input signal passed through. It turned out to be 2in and 8out.

 

 

So any one can give me some suggestions on this problem?

 

 

Many thanks!

Outcomes