Part Number: TMS320F28335
Other Parts Discussed in Thread: C2000WARE, , CONTROLSUITE
Dear team:
I used the official sample program of SPI to do the loopback experiment, and it worked well.
But after I closed loopback and connect the SIMO and SOMI pins with a wire, It can only receive data "1" each bit, and the waveform of the receiving pin is correct. And the same problem when I use SPI to communicate externally: the waveform is correct but the received data is "1" each bit.
How can I handle this situation?
Below is my register configuration of external communication.
SpiaRegs.SPICCR.bit.SPISWRESET = 0;
SpiaRegs.SPICCR.all = 0x0009;
SpiaRegs.SPICTL.all = 0x0017;
SpiaRegs.SPISTS.all = 0x0000;
SpiaRegs.SPIBRR = 0x12;
SpiaRegs.SPIFFTX.all = 0xc065;
SpiaRegs.SPIFFRX.all = 0x6061;
SpiaRegs.SPIFFCT.all = 0x0000;
SpiaRegs.SPIPRI.all = 0x0010;
SpiaRegs.SPIFFTX.bit.TXFIFO = 1;
SpiaRegs.SPIFFRX.bit.RXFIFORESET = 1;
SpiaRegs.SPICCR.bit.SPISWRESET = 1;
Best regards
K.K