From c96fbebd55038ba80ec1ee167eeedf0b0e3ed264 Mon Sep 17 00:00:00 2001 From: Martino Facchin Date: Wed, 28 Oct 2020 14:57:38 +0100 Subject: [PATCH] STM32: EMAC: allow compiling on MCUs without DCACHE --- connectivity/drivers/emac/TARGET_STM/stm32xx_emac.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/connectivity/drivers/emac/TARGET_STM/stm32xx_emac.cpp b/connectivity/drivers/emac/TARGET_STM/stm32xx_emac.cpp index 9068ac697e..356576dd21 100644 --- a/connectivity/drivers/emac/TARGET_STM/stm32xx_emac.cpp +++ b/connectivity/drivers/emac/TARGET_STM/stm32xx_emac.cpp @@ -654,8 +654,10 @@ int STM32_EMAC::low_level_input(emac_mem_buf_t **buf) /* Build Rx descriptor to be ready for next data reception */ HAL_ETH_BuildRxDescriptors(&EthHandle); +#if !(defined(DUAL_CORE) && defined(CORE_CM4)) /* Invalidate data cache for ETH Rx Buffers */ SCB_InvalidateDCache_by_Addr((uint32_t *)RxBuff.buffer, frameLength); +#endif *buf = pbuf_alloc(PBUF_RAW, frameLength, PBUF_POOL); if (*buf) {