2008-08-22 02:53 AM
2011-05-17 12:55 AM
Hi All
I have configured SSP0 of STR912. configuration is as follows: /* SSP0 configuration */ SSP_InitStructure.SSP_FrameFormat = SSP_FrameFormat_Motorola; SSP_InitStructure.SSP_Mode = SSP_Mode_Master; SSP_InitStructure.SSP_CPOL = SSP_CPOL_Low; SSP_InitStructure.SSP_CPHA = SSP_CPHA_1Edge; SSP_InitStructure.SSP_DataSize = SSP_DataSize_8b; //for 1.4 kbps SSP_InitStructure.SSP_ClockRate = 150; SSP_InitStructure.SSP_ClockPrescaler = 228; SSP_Init(SSP0, &SSP_InitStructure); SSP_LoopBackConfig(SSP0, DISABLE); SSP_Cmd(SSP0,ENABLE); Then I am checking while(SSP_GetFlagStatus(SSP0, SSP_FLAG_TxFifoEmpty) == RESET); and then transmitting some data After that waiting for response /* Loop while Transmit FIFO is full */ while(SSP_GetFlagStatus(SSP0, SSP_FLAG_TxFifoEmpty) == RESET); and reading value data = SSP_ReceiveData(SSP0); I am getting same data that I have transmited I am getting same result whether slave is connected or not. I have disabled LoopBack mode. Please help me solve the problem. Regards Sai2011-05-17 12:55 AM
Hi all,
I got solution. I had connected NSS of my master to Nss of slave.But If uc is in master mode NSS has to be connected to VDD(high).Otherwise u will get loopback effect .U will receive whatever u have transmitted. Regards Sai2011-05-17 12:55 AM