STMicroelectronics / stm32u5xx-hal-driver

Provides the STM32Cube MCU Component "hal_driver" of the STM32U5 series.
BSD 3-Clause "New" or "Revised" License
8 stars 11 forks source link

SPI suspend not handled in blocking mode Receive #14

Open rickou opened 2 weeks ago

rickou commented 2 weeks ago

Hi,

After having trouble to receive big packet through SPI using HAL_SPI_Receive (clock @12MHz), I enabled the SPI_MASTER_RX_AUTOSUSP_ENABLE feature to avoid overflow. But, now, i have another issue due to the fact this feature is not handled in the blocking form of Receive..

I know we should use DMA. For whatever reason, the dev could wants to use the blocking version, which is almost not usable as is at high SPI frequencies (caused by other tasks/IRQ premption, or even slow CPU speeds) So, it could be also good to add the SUSP bit clear in the blocking receive function too.. This way user is free to use DMA, IT or blocking receive functions

KRASTM commented 2 weeks ago

Hello @rickou,

Thank you for the report.

In fact, this enhancement has already detected and implemented internally, and it will be available ASAP within the driver.

With regards,

KRASTM commented 2 weeks ago

ST Internal Reference: 167877