Question
STM32F4 discovery SPI issue
Posted on October 09, 2016 at 07:06
and here is the data after adding some delay before SS goes back HIGH:
Any one please know what could cause this to happen? is it because of the TXE buffer flag goes back high before the data transmission complete?(''This is what i saw in the debugger '') and why? it is supposed to go high when there is no data in the buffer. #!spi-!stm32f4
Hello,
- I am using STM32F4 discovery board to send data via SPI. i have got it working but there is a small issue. the SS pin goes high before the the mcu finishes sending data. i am using SPI1, and used PB0 as SS. there is my code for sending one byte: GPIOB->ODR &= ~(1 << PIN0); // SS is LOW SPI1->DR = data; while(! (SPI1->SR & (1 << TXE))); // wait until TX buffer is empty GPIOB->ODR |= (1 << PIN0); // SS is HIGH and here is the data :
and here is the data after adding some delay before SS goes back HIGH:
Any one please know what could cause this to happen? is it because of the TXE buffer flag goes back high before the data transmission complete?(''This is what i saw in the debugger '') and why? it is supposed to go high when there is no data in the buffer. #!spi-!stm32f4