Skip to main content
Visitor II
July 31, 2024
Solved

LwIP integration with external PHY

  • July 31, 2024
  • 1 reply
  • 1582 views

Hello, is it possible to ușe the LwIP Middleware over the low level library for an external PHY such as ENC28J60?If so, could you pinpoint me to a documentation or an article?

Thanks.

    This topic has been closed for replies.
    Best answer by STea

    Hello @TheoMj ,

    Yes, you can use LWIP with probably any external PHY as long as it is compatible with your MCU as LWIP is a generic Network stack designed to be used with your preferred Hardware combination.

    you will need to port the ethernetif.c file and add he dedicated header and source files for ENC28J60 PHY and configure an SPI interface using the correct pins top connect to the PHY module.
    you can find an example implementing a very similar usecase to yours on this link STM32_ENC28J60/src at master · Georges760/STM32_ENC28J60 (github.com)
     you will find attached the source and header files for this PHY as well as the ethernetif file to configure this Network interface with LWIP.

    Regards

    1 reply

    STeaAnswer
    ST Employee
    August 2, 2024

    Hello @TheoMj ,

    Yes, you can use LWIP with probably any external PHY as long as it is compatible with your MCU as LWIP is a generic Network stack designed to be used with your preferred Hardware combination.

    you will need to port the ethernetif.c file and add he dedicated header and source files for ENC28J60 PHY and configure an SPI interface using the correct pins top connect to the PHY module.
    you can find an example implementing a very similar usecase to yours on this link STM32_ENC28J60/src at master · Georges760/STM32_ENC28J60 (github.com)
     you will find attached the source and header files for this PHY as well as the ethernetif file to configure this Network interface with LWIP.

    Regards