AnsweredAssumed Answered

STM32F0-Discovery SPI2 setup and operation.

Question asked by leach.jason.001 on Dec 5, 2013
Latest reply on Dec 6, 2013 by leach.jason.001
I have an application that requires both of the SPI interfaces running as masters. The code currently has SPI1 up and running. I have then copied the setup function calls and updated them to configure SPI2 (taking into account that I have to use APB1 to enable the peripheral)

All compiles and links ok and I can then enter de-bug. The function that starts the send loads the transmit buffer for SPI1 and then SPI2. The next 4 lines of code monitor the TXE flag and BSY flag for both SPI1 and SPI2. On execution both buffers are loaded, TXE flag for SPI1 goes TRUE but then the TXE flag for SPI2 stays FALSE.

On the logic analyser I see that SPI1 has transmitted ok but there is no output from SPI2.

Is the configuration of SPI2 different to SPI1? Do the TXE flags operate differently?

Also I have noticed that the BSY flag is never TRUE for either SPI1 or 2. When does it go TRUE?

Thanks for any help