AnsweredAssumed Answered

SPI Problem

Question asked by jmag999 on Jan 30, 2013
Latest reply on Jan 30, 2013 by jmag999
I am relatively new to the STM32 series.  My project has a custom board with a STM32F102C6.  I have 2 boards.  My first board I have been developing on and everything is working fine.  On the 2nd board, the program gets stuck waiting for the first spi transmission to complete:

SPI_I2S_SendData(SPI1, bRelayStatus[i]);                            // send data
while (SPI_I2S_GetFlagStatus(SPI1, SPI_I2S_FLAG_RXNE) == RESET);    // wait for completion
SPI_I2S_ReceiveData(SPI1);                                      // get dummy byte from rx buffer

If I comment this line out (wait for completion), the rest of the program runs fine.  I do not see any outgoing clock pulses on the spi port, so it seems as if it is not being clocked.  I did enable the clock to the port and everything works fine on the other board.  Occassionally, I can power the 2nd board up and it runs, but never with the debugger.

Any ideas?

Outcomes