2014-04-25 03:56 AM
Created a project targeting STM32F4DISCOVERY + STM32F4DIS-BB from a scratch with CubeMX. Managed to blink LEDs and send bytes over UART but now struggling with Ethernet and LwIP. I have referenced STM32F4DIS-BB example and have added PHY reset into generated ETH GPIO function and both LEDs at ETH connector is set on, but when pinging from pc no input interrupts are triggered nor low_level_input() being called. Any ideas or experience is this HW or LwIP configuration problems. Attached is my *.ioc file. Thanks.
#stm32f4dis-bb #stm32f4-bb+cubemx2016-08-11 07:08 AM
2018-12-09 01:02 PM
Posted my working STM32F4Discovery + STM32F4DIS-BB (lwIP v2.0.3) CubeMX (HAL) Atollic TrueStudio project on:
https://github.com/Broekman/STM32F4Discovery_DIS_BB_CubeMX
For all purposes sake, the things required to make it work (already included in the project above):
In CubeMX:
In the code:
//PHY reset for the STM32F4DIS-BB board.
GPIO_InitTypeDef GPIO_InitStruct;
GPIO_InitStruct.Pin = GPIO_PIN_2;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
HAL_GPIO_Init(GPIOE, &GPIO_InitStruct);
HAL_GPIO_WritePin(GPIOE, GPIO_PIN_2, GPIO_PIN_RESET);
HAL_Delay(50);
HAL_GPIO_WritePin(GPIOE, GPIO_PIN_2, GPIO_PIN_SET);
HAL_Delay(50);
And of course not to forget in the main loop: MX_LWIP_Process();
Hope this helps, good luck!