Skip to main content
Graduate
July 18, 2025
Question

STM32N6 wrong heth and eth_handle definitions for ethernet driver

  • July 18, 2025
  • 2 replies
  • 335 views

Hello,

It took few days to find what is wrong with network, and why I can't get it to work, finally I found what libraries have wrong definitions for heth and eth_handle in file nx_stm32_eth_config.h:

extern ETH_HandleTypeDef heth;
#define eth_handle heth

For N6 MCU correct definition is heth1 defined in main.c, and still, even if you replace heth to heth1 you will not get ethernet to work, I am not sure why, only one way how I get it to work is to replace all heth and eth_handle variables to heth1 in nx_stm32_eth_config.h file !

But the worst moment is then you regenerate code from cubeMX all the replacements is gone and network will not work again.

And for STM team - dont change structures in examples, include IOC files, because cubeMX generates code totally differently, you are not only causing problems for users, but you are also struggling to solve customer issues yourself.

    This topic has been closed for replies.

    2 replies

    Super User
    July 19, 2025

    For a quick workaround, make heth alias of heth1.

    At the end of your link script., add:

    PROVIDE ( heth = heth1 );

     

    ST Employee
    July 21, 2025

    Hello,

    Thank you for your report,

    This issue has been tracked internally. An internal ticket (214510) has already been raised for follow-up.

     

    With Regards,