i want to set my SPI in the spi mode 0.i set the CLKPL CPHASE=00,but the spi data port don't send data and receive data.so i doubt.hope someone can help me
Kindly find the attached code which shows how to configure SPI as transmitter and receiver for mode 0.
Please let me know in case you need any clarification or face any difficulty.
my dsp is set to master .it sent command to the chip.then the chip should send data to DSP.but now it can not get t he data.using the oscilloscope i can catch the ss sck and the command signals, it seems ok.so i suspect it could be spi mode do not meet the timing requirements of the chip.
now my setting :
*pSPIFLG = DS0EN | SPIFLG0;
*pSPICTL = (TXFLSH | RXFLSH) ;
/* Setup the baud rate to 500 KHz */
*pSPIBAUD = 100;
/* Now setup the SPI Control register : 0x5281*/
*pSPICTL = TIMOD1 | GM | WL8| SPIMS | SPIEN | MSBF;
and the chip timing
Could you kindly post the oscilloscope capture you observing on your side, so that we can check the clock and the command signals. Also please let us know, which chip are you referring to, in this issue.
Retrieving data ...