AnsweredAssumed Answered

Shift register doesn't transfer to DR register in SPI bus read

Question asked by Shilkoff.Larry on Dec 8, 2016
Latest reply on Dec 10, 2016 by S. Marsanne

I'm attemping to read the data from a 8 bit SPI bus transfer. It seems the data is getting into the shift register, but not transferring into the DR register after clocking the data. I have confirmed the RXNE and OVR flags are clear by reading the DR register prior to clocking data in. After the data is clocked into the SPI port, the RXNE flag is confirmed set, with only 0x00000000 indicated in the DR register (0x00000045 was expected). Everything seems to be set up correctly. Any thoughts on anything I may have missed?

 

I've attached my initialization settings for the GPIO and SPI busses, the called routine for reading the bus, and a scope photo showing the clock and data. I'm reading from external memory, so the photo shows the first 16 clocks as the address for the byte data and the remaining 8 clocks as the data from the external memory. The top trace is data out of the STM32F105RC, center trace is SCLK, and the bottom trace is data into the STM32F105RC.

Outcomes