cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F4 SPI & Busy state

shopping
Associate II
Posted on September 06, 2014 at 04:45

Hello,

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.

Thanks,

Razvan

#stm32-spi-nss
0 REPLIES 0