cancel
Showing results for 
Search instead for 
Did you mean: 

MCU freeze on Ethernet connection, on Olimex STM32-E407 Rev.F

SArzb.1
Associate

Hi,

First I'm new to the STM environment.

I'm setting up the Board to test some stuff, with raw LwIP. I'm having a weird issue, where the board freezes when i plug in a connected ethernet cable.

I made no other changes (exept one, look below point 3)

Code (tcpecho_raw_init is from an example):

int main(void)
{
  HAL_Init();
 
  SystemClock_Config();
 
  MX_GPIO_Init();
  MX_LWIP_Init();
 
  LED_timer = TCP_timouts_timer = HAL_GetTick();
 
  tcpecho_raw_init();
 
  while (1)
  {
    if (TCP_timouts_timer < HAL_GetTick())
    {
      sys_check_timeouts();
      TCP_timouts_timer = HAL_GetTick() + 5;
    }
 
    if (LED_timer < HAL_GetTick())
    {
      HAL_GPIO_TogglePin(LED_PIN_GPIO_Port, LED_PIN_Pin);
      LED_timer = HAL_GetTick() + 500;
    }
    HAL_Delay(1);
  }
}

Board: Olimex STM32-E407 Rev.F

Toolchain: STM32CubeIDE + ST-Link v2

Thank you for your Help

Stefan

PS: Other Problems you could help me with:

  1. Starting the debugger is very unreliable, like 30% success rate
  2. When something goes wrong, the previously working code needs 2 or 3 flashes to complete init again. Mostly the Chip freezes on clock config afterwards.
  3. The Waiting for the ETH_Speed auto negotiation times out the debugger. Reducing the timeout manually is reverted on codegeneration by cube MX
0 REPLIES 0