From 5657b4f668cc090ea2a3b58d69c3c2a258112335 Mon Sep 17 00:00:00 2001 From: Jookia Date: Sat, 11 Mar 2023 14:20:34 +1100 Subject: [PATCH] STM32F7: Unconditionally enable QSPI workarounds On the STM32769NI at least this patch is required for stable QSPI use. Enable it uncondtionally in case other boards need it too. Further discussions: https://github.com/ARMmbed/mbed-os/issues/10049 https://github.com/ARMmbed/mbed-os/issues/15108 https://github.com/STMicroelectronics/STM32CubeF7/issues/52 https://github.com/STMicroelectronics/STM32CubeF7/issues/82 --- .../STM32F7xx_HAL_Driver/stm32f7xx_hal_qspi.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/targets/TARGET_STM/TARGET_STM32F7/STM32Cube_FW/STM32F7xx_HAL_Driver/stm32f7xx_hal_qspi.c b/targets/TARGET_STM/TARGET_STM32F7/STM32Cube_FW/STM32F7xx_HAL_Driver/stm32f7xx_hal_qspi.c index be14334ac73..70e95c17f43 100644 --- a/targets/TARGET_STM/TARGET_STM32F7/STM32Cube_FW/STM32F7xx_HAL_Driver/stm32f7xx_hal_qspi.c +++ b/targets/TARGET_STM/TARGET_STM32F7/STM32Cube_FW/STM32F7xx_HAL_Driver/stm32f7xx_hal_qspi.c @@ -571,10 +571,8 @@ void HAL_QSPI_IRQHandler(QSPI_HandleTypeDef *hqspi) __HAL_DMA_DISABLE(hqspi->hdma); } -#if defined(QSPI1_V1_0) /* Clear Busy bit */ HAL_QSPI_Abort_IT(hqspi); -#endif /* Change state of QSPI */ hqspi->State = HAL_QSPI_STATE_READY; @@ -616,10 +614,8 @@ void HAL_QSPI_IRQHandler(QSPI_HandleTypeDef *hqspi) } } -#if defined(QSPI1_V1_0) /* Workaround - Extra data written in the FIFO at the end of a read transfer */ HAL_QSPI_Abort_IT(hqspi); -#endif /* Change state of QSPI */ hqspi->State = HAL_QSPI_STATE_READY; @@ -1021,10 +1017,8 @@ HAL_StatusTypeDef HAL_QSPI_Transmit(QSPI_HandleTypeDef *hqspi, uint8_t *pData, u /* Clear Transfer Complete bit */ __HAL_QSPI_CLEAR_FLAG(hqspi, QSPI_FLAG_TC); -#if defined(QSPI1_V1_0) /* Clear Busy bit */ status = HAL_QSPI_Abort(hqspi); -#endif } } @@ -1112,10 +1106,8 @@ HAL_StatusTypeDef HAL_QSPI_Receive(QSPI_HandleTypeDef *hqspi, uint8_t *pData, ui /* Clear Transfer Complete bit */ __HAL_QSPI_CLEAR_FLAG(hqspi, QSPI_FLAG_TC); -#if defined(QSPI1_V1_0) /* Workaround - Extra data written in the FIFO at the end of a read transfer */ status = HAL_QSPI_Abort(hqspi); -#endif } }