2013-07-18 12:19 PM
Hi,
I have Problems with STM32F407VGT6 and SPI, I read from SPI 2x 16-bit words from device. In documentation is written after the first word is read then wait for short period that th one clock cycle starte then disable the SPI and wait until the commnication is going to end. The communication is read only with Software managed chip select. But this is not working. When I disable SPI, the communication stops immediatley and the cycle is incomplete. When I disable all Interrupts and wait until the second word is complete then everything is working but I block the CPU for Long time. That couldnt be the solution!? Do have anybody an idea how to stop the SPI clock exactly after end of second cycle. Using Interrupt is not a solution. Thanks for your help. #stm32f-spi-stop2013-07-18 01:52 PM
TXE is not a good signal to determine if SPI is busy, RXNE better reflects the TC (Transmission Complete) state after the last bit has shifted out.
Not sure why you would disable interrupts.