STMicroelectronics / stm32g4xx_hal_driver

Provides the STM32Cube MCU Component "hal_driver" of the STM32G4 series.
BSD 3-Clause "New" or "Revised" License
14 stars 9 forks source link

[HAL][SPI] Fix state change issue in Rx functions by validating parameters first #16

Open raqnarok opened 3 weeks ago

raqnarok commented 3 weeks ago

[HAL][SPI] Fix state change issue in Rx functions by validating parameters first

When using full-duplex SPI in master mode, the parameters of the Rx function are checked in the TxRx functions. However, the HAL_SPI_STATE_BUSY_RX state is set in the Rx function. Therefore, if the Rx function is called with invalid parameters, the TxRx function returns an error, leaving the SPI state stuck in HAL_SPI_STATE_BUSY_RX.

Fixes #17

KRASTM commented 3 weeks ago

ST Internal Reference: 185358