Skip to main content
Explorer
March 14, 2025
Solved

Making Ethernet work with LwIP and FreeRTOS on STM32F7

  • March 14, 2025
  • 2 replies
  • 1030 views

I am writing this post in case anybody encounters a similar problem.

I had a problem with assigning IP address to STM32F769I-DISCO devboard and communicating with it via Ethernet while using LwIP and FreeRTOS. The solution to this problem was disabling D-Cache in Cortex_M7 settings in STM32CubeMX. I don't know if I would ever think about trying this out if not for the old forum thread I found.

    This topic has been closed for replies.
    Best answer by mƎALLEm

    Hello,

    Disabling the cache is not a good solution because that decreases the overall system performance. But disable the cache on the a specific regions using MPU where the Tx/Rx descriptors and LWIP memory pool are located.

    See for example this article on STM32H7 / section Cortex-M7 configuration.

     

    2 replies

    mƎALLEmAnswer
    Technical Moderator
    March 14, 2025

    Hello,

    Disabling the cache is not a good solution because that decreases the overall system performance. But disable the cache on the a specific regions using MPU where the Tx/Rx descriptors and LWIP memory pool are located.

    See for example this article on STM32H7 / section Cortex-M7 configuration.

     

    _AdamNtrxAuthor
    Explorer
    March 14, 2025

    I remember trying out the MPU configuration in sample HTTP server program and it didn't work. It's possible that I did something incorrectly though.

    Technical Moderator
    March 14, 2025

    @_AdamNtrx wrote:

    I remember trying out the MPU configuration in sample HTTP server program and it didn't work. It's possible that I did something incorrectly though.


    Yes I think so.

    Graduate
    March 14, 2025

    Hello,

     

    I attached project file for STM32F7 with FreeRTOS and LwIP.

    it is operated on STM32F767 NUCLEO board. (without Cache)

    Refer to the attached file.