Question
Bug in STM32L4xx_HAL_Driver (SPI Transmit)
Posted on March 21, 2016 at 13:30
Component: STM32L4xx_HAL_Driver
File: stm32l4xx_hal_spi.c Function: HAL_SPI_Transmit Line number: 519 Description: SPI RX FIFO not empty after transmit. Solution: Remove{
__HAL_SPI_CLEAR_OVRFLAG(hspi); } Insert{
__IO uint32_t tmpreg; tmpreg = hspi->Instance->DR; while ((hspi->Instance->SR & SPI_FLAG_RXNE) == SPI_FLAG_RXNE) { tmpreg = hspi->Instance->DR; /* read the received data */ } tmpreg = hspi->Instance->SR; UNUSED(tmpreg); } Note: please review all SPI code, it may containsimilar bugs. #stm32cubef3 #stm32cubel4 #bug #spi