Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of mbed-dev by
Diff: targets/TARGET_STM/stm_spi_api.c
- Revision:
- 181:57724642e740
- Parent:
- 179:b0033dcd6934
- Child:
- 186:707f6e361f3e
--- a/targets/TARGET_STM/stm_spi_api.c Wed Jan 17 15:23:54 2018 +0000
+++ b/targets/TARGET_STM/stm_spi_api.c Fri Feb 16 16:09:33 2018 +0000
@@ -526,6 +526,11 @@
NVIC_SetPriority(irq_n, 1);
NVIC_EnableIRQ(irq_n);
+ // flush FIFO
+#if defined(SPI_FLAG_FRLVL) // STM32F0 STM32F3 STM32F7 STM32L4
+ HAL_SPIEx_FlushRxFifo(handle);
+#endif
+
// enable the right hal transfer
int rc = 0;
switch(transfer_type) {
