2007-09-20 11:04 PM
2011-05-17 12:47 AM
We use AD73360L with STR912FA44 , They are connected in cascade as master to SSP1 (TI mode), STR9 is the slave.
Here is my code. SSP1 Initialization : SSP_DeInit(SSP1); SSP_InitStructure.SSP_FrameFormat = SSP_FrameFormat_TI; SSP_InitStructure.SSP_Mode = SSP_Mode_Slave; SSP_InitStructure.SSP_SlaveOutput = SSP_SlaveOutput_Enable; SSP_InitStructure.SSP_DataSize = SSP_DataSize_16b; SSP_Init(SSP1, &SSP_InitStructure); SSP_LoopBackMode(SSP1, DISABLE); SSP_Cmd(SSP1, ENABLE); Data reading: for(i = 0;i < 25600;i++){ while(SSP_GetFlagStatus(SSP1, SSP_FLAG_RxFifoNotEmpty)==RESET); FD[i] = SSP_ReceiveData(SSP1); } SCLK is 1,6 MHz. Problem: If we activate booth channel one and two at booth ADCs very often the value of 2nd channel gets lost, it even doesn't get to the FIFO of SSP. It seems that STR9 does not react on NSS signal at 17th clock. if we activat channels 1, 3, 5, there is always a space between and everything works correctly. We have hacket the circuitry to remove every 17th clock, then everything works as supposed but we only can read 15 bit values, which is not satisfying. We believe that this problem is related to erila107. Does anyone know what causes this problem with SSP and how to avoid it correctly? Data from ADCs: [ This message was edited by: Maca on 21-09-2007 11:35 ]