AnsweredAssumed Answered

STM32F4 SPI & Busy state

Question asked by cojocariu.razvan on Sep 6, 2014

I'm trying to handle the Chip Select pin via software, but I can't figure out how to determine when the SPI peripheral has finished the current transfer.

By the looks of it, the SPI_SR_BSY flag, becomes 0 as soon as the last bit was sampled, which means there's almost half a SPI clock left before the transmission is over.

The problem with this, is that if you set CS high as soon as the BSY flag is off, the device you're talking to, might not get a chance to sample the last bit that we've sent, because it might sist communication once CS goes high.