Skip to main content
Associate III
November 29, 2023
Solved

How Ethernet MAC interrupts have been enabled by STM32CubeH7?

  • November 29, 2023
  • 2 replies
  • 1974 views

Hi all. This is the first time I am using CubeH7 + FreeRTOS + LwIP. I have tried to trace down how Ethernet MAC interrupts have been enabled. If I got the code correctly:

+ I enabled "Ethernet global interrupt" option from CubeMX "ETH".

+ I enabled "LwIP" and "FreeRTOS" from CubeMX.

+ "LwIP", "FreeRTOS" and "ETH" are all owned by Cortex-M4.

Then when I trace down function calls MX_LWIP_Init() -> netif_add() -> ethernetif_init() -> low_level_init(). Seems there is no Ethernet interrupt enabling code...

And when I setup a breakpoint to HAL_ETH_IRQHandler(). It's not getting called as well...

I am now using:

STM32CubeMX v6.9.2

STM32CubeH7 v.1.11.1

Maybe I setup something wrong? Thanks!

 

This topic has been closed for replies.
Best answer by Pavel A.

In the code (especially ethernetif.c ) look for call to HAL_ETH_Start_IT(&heth). This enables the ETH interrupts.

2 replies

Pavel A.
Pavel A.Best answer
Super User
December 2, 2023

In the code (especially ethernetif.c ) look for call to HAL_ETH_Start_IT(&heth). This enables the ETH interrupts.

Leon_MSAuthor
Associate III
December 7, 2023

Thanks @Pavel A. !