cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeMX ETH PHY IRQ handler

Peeters.Bram
Senior
Posted on June 11, 2015 at 13:20

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 #eth
2 REPLIES 2
chrif
Associate II
Posted on June 23, 2015 at 16:02

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. 

 
Michael Steinecke
Associate II
Posted on June 29, 2015 at 15:34

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.