Skip to main content
LMorr.3
Senior
June 5, 2023
Solved

SPI RXNE bit not clearing on read

When I enable SPE for my Spi I receive 1 byte as expected, and the RXNE flag is set.

However, when I read the SPI1->DR value, it does not clear RXNE. I also noticed the OVR flag is set for some reason, even though I am reading the ->DR in the RXNE interrupt handler.

I'm sure I'm missing something simple :)

This topic has been closed for replies.
waclawek.jan
waclawek.janBest answer
Super User
June 5, 2023

Which STM32?

> I receive 1 byte as expected

How exactly?

Note, that Rx-only mode clocks autonomously as long as SPE is enabled.

JW

2 replies

waclawek.jan
waclawek.janBest answer
Super User
June 5, 2023

Which STM32?

> I receive 1 byte as expected

How exactly?

Note, that Rx-only mode clocks autonomously as long as SPE is enabled.

JW

LMorr.3
LMorr.3Author
Senior
June 7, 2023

Thanks for the heads-up. I now see the clock continuously runs if SPE is enabled and in RXONLY mode. I ended up using FullDuplex and transmitting dummy bytes out for each byte received.