This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Problem with SPI-Bus

Hello, I have a problem with the SPI-Bus.
I am using the Keil MCB-STR9-Board. When I debug the SSP example source from ST, I will hang in the while loop "SSP_GetFlagStatus(SSP1, SSP_FLAG_RxFifoNotEmpty)==RESET" forever.
SPI-CLk and SPI-Data is driven out from the SPI-Master (SPI0). I have modified the source, but I never get data into the SPI-Slave (SPI1).
After that I tried to set the SPI-Data-In from the master to high or low, but I never get the data 0x00 or 0xFF in the receive-buffer in the Master. I allways have the loopback data from the SPI0-Transmitter.
The Control register 1 from SPI0 is set to 0x0002. I think the loopback function is not enabled with that. What have I made wrong?
Thanks
Thomas

Parents
  • If you read the data that was written to the fifo, then you are in half duplex transmission mode. You should try with Microwire format instead of Motorola.

    As for the example that tries to write to SSP1, you have to connect together MOSI/MISO of the 2 interfaces otherwise you will wait for a very long time before the data arrives.

    -cp

Reply
  • If you read the data that was written to the fifo, then you are in half duplex transmission mode. You should try with Microwire format instead of Motorola.

    As for the example that tries to write to SSP1, you have to connect together MOSI/MISO of the 2 interfaces otherwise you will wait for a very long time before the data arrives.

    -cp

Children