AnsweredAssumed Answered

CubeMX ethernet of clean generated code chrashes (lwIP FreeRTOS STM32F4)

Question asked by di.lau on Feb 19, 2016
Latest reply on May 11, 2016 by STM32Cube-T

After compiling the CubeMX generated Code (without any changes).
The Ethernet stack crashes if it receives many UDP-packages in a short time. (1000-10000 10Byte packages in a few ms)

Even after stopping the flood the interface never comes up again.
The interface only comes back again if I call "static void low_level_init(struct netif *netif)" (without creating the thread and semaphore again) or after a software reset.
This behaviour is really bad.

Could you help me?

uC: STM32F437IITx
PHY: DP83848

CubeMX 4.13.0 (Firmware Package for Family STM32F4 1.11.0):
- FREERTOS
   - [x] Enabled
- LWIP
   - [x] Enabled
- ETH:
   - Mode: MII
   - [ ] Activate Rx Err signal
- RCC:
   - High Speed Clock (HSE): Crystal/Ceramic Resonator
   - Low Speed Clock (LSE): Disable
   - [x] Master Clock Output 1
   - [ ] Master Clock Output 2
   - [ ] Audio Clock Input (I2S_CKIN)
- SYS:
   - Debug: JTAG (5 pins)
   - [ ] System Wake-Up
   - Timebase Source: TIM6
  
ETH_COL is sticked to pin PA3.

LWIP settings:
- IP_ADDRESS (IP Address): 192.168.001.049
- NETMASK_ADDRESS (Netmask Address): 255.255.255.000

 

 

Another error, which has nothing to do with the upper one, is (stm32f4xx_hal_conf.h):
#define PHY_MICR_INT_OE                 ((uint16_t)0x0002U)  /*!< PHY Enable output interrupt events              */

It should be:
#define PHY_MICR_INT_OE                 ((uint16_t)0x0001U)  /*!< PHY Enable output interrupt events              */

 

Outcomes