Skip to content

Commit

Permalink
[stm32] Disable MASRX in STM32H7 SPI
Browse files Browse the repository at this point in the history
Follow-up to 678fd9a and #1223.
It seems that once the RX FIFO has been cleared and emptied, the next
transmitted byte always enters SUSP mode. It is unclear why this
happens. When MASRX is not set, neither SUSP nor OVR are seen for the
same transmit sequence.
  • Loading branch information
WasabiFan committed Nov 18, 2024
1 parent 7b571a6 commit e6b78f9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/modm/platform/spi/stm32h7/spi_hal_impl.hpp.in
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@ SpiHal{{ id }}::initialize(Prescaler prescaler,
// initialize with unlimited transfer size
setTransferSize(0);

// Pause master transfer if RX FIFO is full
SPI{{ id }}->CR1 = SPI_CR1_MASRX;
SPI{{ id }}->CR1 = 0;

SPI{{ id }}->CFG2 = static_cast<uint32_t>(dataMode)
| static_cast<uint32_t>(dataOrder)
Expand Down

0 comments on commit e6b78f9

Please sign in to comment.