On Wed, 21 Oct 2026 at 07:52, Manuele Conti <[email protected]> wrote: > > Writing SPI_DR already performs the synchronous SSI transfer and stores > its response in spi_dr. Reading SPI_DR performs another transfer, using > the previous response as transmit data, and returns the new response. > Consequently a normal write/read pair clocks two frames on the bus and > can skip bytes in a peripheral's response. > > Return the response saved by the write and clear RXNE without starting > another transfer. Repeated reads then leave the peripheral state alone. > > Add a qtest using the upstream netduino2 machine and an M25P80 flash. > Check the JEDEC ID, RXNE clearing, and repeated DR reads. The test requires > no board changes and reproduces the unwanted extra transfers before the > fix. > > Fixes: 5ae74402d1f ("STM32F2xx: Add the SPI device") > Signed-off-by: Manuele Conti <[email protected]>
Applied to target-arm.next, thanks. -- PMM
