AnsweredAssumed Answered

Initialize order for SPORT programming

Question asked by ThierryNolf on Mar 9, 2015
Latest reply on Mar 13, 2015 by jobo23

Hi All,

 

Is there any order that should be respected when initializing two SPORT's running synchronious in multi channel ?

Is that order described in any document ?

 

I'm using two sport's (0 and 1) to get a combination sending 16 channels audio, 16 samples per channel for each FSYNC.  Each sport (a and b from 0 and 1) is sending 4 channels, 16 samples gives us 64 channels.

The data is fetched from external memory through TCB-DMA.

My sync routine is like :

1* Clear SP0CS0,SP1CS0,SPCTL0,SPMCTL0,SPCTL1,SPMCTL1

2* Set CPSP0A and pCPSP0B

3* Program and enable SPCTL0 and SPMCTL0

4* Set CPSP1A and pCPSP1B

5* Program and enable SPCTL1 and SPMCTL1

6* Enable multi channels SP0CS0,SP0CS1,SP1CS0,SP0CS1

 

I re-do this init routine to reset the sport after a new audio sample frequency is selected.  This gives wrong output in 1 case at +/- 200 selections.  By changing the order to :

1* Clear SP0CS0,SP1CS0,SPCTL0,SPMCTL0,SPCTL1,SPMCTL1

2* Set CPSP0A and pCPSP0B and CPSP1A and pCPSP1B

3* Enable multi channels SP0CS0,SP0CS1,SP1CS0,SP0CS1

4* Program and enable SPCTL0 and SPMCTL0

5* Program and enable SPCTL1 and SPMCTL1

 

Now it seems to work all the time.

I cannot find any spec in the order and timing for setting the registers.

 

Is my assumption correct and should there be an order that I should keep in mind ?

 

Thanks,

 

Br,

 

Thierry

Outcomes