Hard facts:
MCU: LCP54608j512
Custom hardware
Official LWIP Port from SDK 2.6.0.
FreeRTOS-MPU (Arm cortex M4 port for FreeRTOS)
Scenario:
Our hardware is running, while a tcp connection is being established.
In the field, i.e. 10 devices are running and communicating with a server.
This results in a memory management fault once in about 1-2 days on each device.
We were able to force this error with ping traffic adding to the already established tcp connection.
Failure:
Inside the ENET ISR, we are sporadically getting MemMange faults on code, which normally works fine. The fault occurs during access on privileged memory inside FreeRTOS API. However, our assumption was that memory access in ISRs always uses the default memory map and cannot cause a MemManage exception.
To exclude that unprivileged access via the MPU is taking place, we have raise the privilege using the corresponding FreeRTOS functions around the FreeRTOS API causing the fault.
We're currently stuck and out of approaches to further debug the issue.
Below you find the stack trace.
We have the assumption, that the bug mentioned in this thread is caused by the issue that has been fixed in the latest FreeRTOS Version V10.3.0.
The release notes state the following interesting point:
"Update existing MPU ports to correctly disable the MPU before it is updated."
Source: https://www.freertos.org/History.txt
What do you think about this?
Could this lead to our problem in your opinion?
Hi,
Can you provide more information on where are the dma descriptor and ethernet data located in SRAM or DRAM? Also, is it the RX or TX? From the description by lowering the ISR priority, the issue went away. This seems to be a race condition.
Have a nice day!
Regards
Soledad