cancel
Showing results for 
Search instead for 
Did you mean: 

New Ethernet driver does not work properly (F4 series)

user 143
Associate III

Guys, unfortunately I don't know what to do. A few days ago I updated to the latest HAL version for the F4 series (1.8.3). With 1.8.0 there was a big change in the Ethernet driver, so some adjustments were necessary. I already used the low_level_...() functions from ST, which are included in the examples and are also generated by CubeMX.

Since the upgrade I always get DMA errors in the function HAL_ETH_Transmit(). More precisely at the following point:

/* Wait for data to be transmitted or timeout occurred */
while ((dmatxdesc->DESC0 & ETH_DMATXDESC_OWN) != (uint32_t)RESET)
{
  if ((heth->Instance->DMASR & ETH_DMASR_FBES) ! = (uint32_t)RESET)
  {
    heth->ErrorCode |= HAL_ETH_ERROR_DMA;
    heth->DMAErrorCode = heth->Instance->DMASR;
    /* Return function status */
    return HAL_ERROR;
  }
[..]

heth->DMAErrorCode then contains the following value: 0x1886486

The strange thing is, simple pings, UDP and TCP echo servers work. However, as soon as the amount of data increases (http), the function exits with HAL_ERROR.
I also had a look at the parameters passed to the function low_level_output(struct netif *netif, struct pbuf *p), especially the *p variable and compared it with the old, working driver version. The content of *p is completely identical. There are 5 chained buffers. Both the content and the memory addresses are identical with the old and new driver versions. Ping and Co work because only one pbuf is allocated here.

I have now also created a new CubeMX project where only Ethernet is configured with LwIP. Here the same thing happens with the same error code in heth->DMAErrorCode.
Has anyone got the new Ethernet driver running on an F407? Any ideas?

 

 

10 REPLIES 10
mƎALLEm
ST Employee

Hello all,

No connection of USB OTG nor Ethernet to the internal Flash is confirmed.

Proposed to update the two sections 2.1.6 and 2.1.7 to be more specific regarding that point.

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.