2015-06-11 04:20 AM
Hi,
I was looking into how the generated code for an STM32F427 (with eth and lwip enabled) deals with ethernet status change events (network cable plug in/out, speed changes, ...). I could not find a polling loop, but in ethernetif.c. in low_level_init, there is a section where PHY interrupts are enabled (cfr ''Configure PHY to generate an interrupt when Eth Link state changes ''). However I cannot find any trace of a handler for this interrupt or where it is configured via which pin the phy interrupt is connected to the processor. Since there are no configuration options for this in the STM32CubeMX tool either, i am starting to suspect that this functionality is missing but on the other hand it is weird that the phy interrupt part is covered ? Any suggestions ? Thanks #phy #irq #eth2015-06-23 07:02 AM
Hi,
CubeMx doesn't support PHY interrupt, it seems to be a big application so there is no option to configure it. The application under STM32Cube_FW_F4_V1.6.0\Projects\STM324xG_EVAL\Applications\LwIP\LwIP_HTTP_Server_Raw\ support ethernet link change, you can find in main.c in the function ''BSP_config'' that PB14 is the corresponding pin to Ethernet link interrupt.2015-06-29 06:34 AM
Hi
I have an STM32F429, but i guess its the same. If you are using LwIP, in the ethernetif.c you find __weak void ethernetif_notify_conn_changed() Implement that.