Skip to main content
Visitor II
December 1, 2023
Question

STM32H743 LWIP + MQTT FreeRTOS Memory Management Fault

  • December 1, 2023
  • 2 replies
  • 3678 views

Hello everyone,

I'm using LWIP and MQTT on STM32H743 with FreeRTOS in STM32CubeIDE 1.13.2 and Package FW_H7 V1.11.0.

I setup the project according to this guide.
With this I can connect to a broker and publish messages.

During development of my application I came accross some issues with memory management faults.

I reduced the application to only one task sending the same message periodically to ensure the fault is not on my part of the programm.

Also in this setup the following fault still occurs:
Memory Management Fault - Data access violation (DACCVIOL)
in tcp_out.c tcp_output() method when trying to acces "useg->tcphdr->segno"

Can anyone help me with this issue.
Thanks.

    This topic has been closed for replies.

    2 replies

    Visitor II
    December 1, 2023

    The Memory Management Fault - Data Access Violation (DACCVIOL) often occurs when your code attempts to access memory in a way that violates the memory protection mechanism of the microcontroller. This is a thread about how to investigate the cause of the Fault Reports.

    https://community.st.com/t5/stm32-mpus-products/how-to-investigate-the-cause-of-the-fault-reports/td-p/231553

    dtxAuthor
    Visitor II
    December 4, 2023

    Thank you for your answer.
    Unfortunately, that didn't really bring me any further.

    Graduate
    January 8, 2024

    Same situation. If I make some vTaskDelay 100-500mS after mqtt public - faults are rare. But on full speed it faults after few seconds.

    UPD. If I make publish couple bytes with frequency 1 Hz - everything is stable. But I need at least 200Hz with 20kBytes payload. Seems it not reachable with current library. Sad to see, that library has no any protection from such situation. I tries to wait for callback and pause publishing, but it not work.