2016-11-09 09:14 PM
I have question about SPI communication on the STM32F303.
Read processing from slave device(SD) in SPI does not go well. I expected that 1 is returned, but 0 is returned. I check program code and signal by oscilloscope. When the read access to data register(DR) is performed, the clock signal from SCK was not output. When the write access to DR is performed, the clock signal was output. So I think clock is output when read access. Is this recognition a correct? If it is correct, what will be considered as a cause? If it is not correct, when will a signal occur in program control? Before doing read access, I confirm that SPI_FLAG_RXNE flag is set. #stm322016-11-25 03:42 AM
Hello,
You can refer to the reference manual RM0316 for more clarification about SPI communication.Regards2016-11-29 10:06 PM
You have to send a dumb (0xff) to the slave after sending your command to be able to receive data from slave without sending any data SCLK will be low.