2014-11-11 06:51 AM
2014-11-11 08:04 AM
I'd be using SPI_Send_Receive() for everything. Back waiting on TX as you do in the opcode send is broken, you want to wait on RXNE AND read the SPI data register to clear RXNE
2014-11-11 10:59 PM
Thanks for the advice.
Another source of the problem though was that the clock speed was too slow on the SPI pins compared to the NCS pin. After changing my prescale value toSPI_InitStructure.SPI_BaudRatePrescaler
=
SPI_BaudRatePrescaler_8
;
everything started working correctly.
There were also a few issues in the code as clive.002 pointed out.2014-11-12 12:07 AM
WP and HOLD is connected to logic high ?