Hi
I am using Synchromaster SPI component for SPI and following is the settings, When I probed the CS pin I found it is at one steady state of logic high. It is not changing its logic level. I somehow managed to get the o/p from slave's WHO_AM_I register but when I am leaving cs pin floating then only I am getting the values that too with uncertainty. Sometimes the values come but some times 0x00. the occurrence is not proper,I tried with external bit_io pin as cs pin but that also didn't worked.

the waveform of SCLK-MOSI is following, here I am sending 0xA0FF value . Starting A0--> r/w + other register's address as discussed above. FF--> these are don't care bits.

the waveform of sclk-MISO is following. In this as per the diagram mentioned earlier the data bits are acquired in the last 8 bits. The response as expected was 0xB1 which I am getting some times.

When the value dosen't come then waveform for sclk-MISO is following. Here I am getting 0x00

the combined waveform of MOSI-MISO is following

As I mentioned the CS pin (here PTD0) is not working it is by default in disable state so its waveform is below.

My Current code which is using the SPI_PDD . thanks to BlackNightfor his link for PDD driver is below
/* User includes (#include below this line is not maintained by Processor Expert) */
int32_t i;
/*lint -save -e970 Disable MISRA rule (6.3) checking. */
int main(void)
/*lint -restore Enable MISRA rule (6.3) checking. */
{
/* Write your local variable definition here */
/*** Processor Expert internal initialization. DON'T REMOVE THIS CODE!!! ***/
PE_low_level_init();
/*** End of Processor Expert internal initialization. ***/
/* Write your code here */
for(;;)
{
SPI_PDD_WriteSlaveData16Bits(SPI0_BASE_PTR, 0xA0FF);
i = SPI_PDD_ReadData8bits(SPI0_BASE_PTR);
printf("0x%0X\n",i);
WAIT1_Waitms(400);
}
/*** Don't write any code pass this line, or it will be deleted during code generation. ***/
/*** RTOS startup code. Macro PEX_RTOS_START is defined by the RTOS component. DON'T MODIFY THIS CODE!!! ***/
#ifdef PEX_RTOS_START
PEX_RTOS_START(); /* Startup of the selected RTOS. Macro is defined by the RTOS component. */
#endif
/*** End of RTOS startup code. ***/
/*** Processor Expert end of main routine. DON'T MODIFY THIS CODE!!! ***/
for(;;){}
/*** Processor Expert end of main routine. DON'T WRITE CODE BELOW!!! ***/
} /*** End of main routine. DO NOT MODIFY THIS TEXT!!! ***/
the o/p in terminal window (when CS pin is floating)

When CS pin connected to 0 or 3.3V I am getting the following o/p

Regards
Amit Kumar