Fatal bus error on STM32F407IGT6 + lwIP + DP83848 PHY with Cube V1.27.1
- February 3, 2023
- 2 replies
- 2082 views
Hi ST Community,
Trying to get lwIP HTTP server working on STM32F407 with Cube V1.27.1. I am able to ping, however on the first HTTP request I get DMASR FBES (Fatal bus error) and after that, neither pings nor TCP packets get any response. Looking through the stm32f4xx_hal_eth.c, I see that FBES gets detected in HAL_ETH_Transmit and on the next HAL_ETH_Transmit call, the ETH_Prepare_Tx_Descriptors fails due to descriptor DESC0 showing that is owned (ETH_DMATXDESC_OWN) by DMA.
I believe this issue is caused by DMA attempting to access HTTP buffer in memory, but I am not 100% sure.
I am using Waveshare EVK407I dev board, which does come with a working example with old Cube V1.6.0. The example code can be found on their wiki. Therefore I am convinced that the hardware works, the issue has to be with the new stm32f4xx_hal_eth.c or lwIP. Worth to mention, I do not get any issues on Cube V1.27.1 on STM32F429 with LAN8742 (Nucleo).
Below is my code. Thank you.