MCU Ramdump Feature
Currently, crash information for MCU0 and MCU1 shares the same memory region. If MCU0 and MCU1 crash simultaneously, the information saved by the MCU ramdump feature becomes unreliable.
Overview
The MCU ramdump feature was developed primarily to print and preserve exception information when the MCU crashes or enters an abnormal state, facilitating analysis and localization of the root cause.
Exception Handling Flow
When the MCU enters an exception, it saves the context information into a global variable. This global variable can be read either by the A-core or via the MCU shell.
If MCU0 encounters an exception, the system will reboot. During the reboot process, the system checks the reboot reason. If the reboot reason is identified as mpainc, the system ensures that the memory region corresponding to the global variable storing the MCU exception context is not cleared to zero. Consequently, after system reboot, we can retrieve the ramdump data and analyze the cause of the exception.
The exception handling flow is illustrated below:

The exception handling flows for MCU0 and MCU1 are largely similar, with the only difference being that MCU0 triggers a system reboot after handling the exception.
Rebooting MCU1 After an Exception
When MCU1 encounters an exception, it drops into the shell. At this point, you can stop and restart MCU1 using the A-core remoteproc control mechanism. Example commands are as follows:
# Stop execution
echo stop > /sys/class/remoteproc/remoteproc_MCU0/state
# Start execution
echo start > /sys/class/remoteproc/remoteproc_MCU0/state
Retrieving MCU Exception Information
-
You can read the context information recorded during an MCU1 exception via a sysfs node on the A-core. The corresponding sysfs path is:
cat /sys/devices/platform/soc/soc:mcu_crash/crash -
When MCU0 crashes and the system reboots, if the reboot reason is determined to be
mpainc, the context information is dumped to the/logpartition for historical log analysis. The dumped log directory follows the naming format:SuperSoC_Mdump-<count>-<time>.
Here,<count>indicates the number of system reboots, and<time>represents the timestamp in the format:Year_Month_Day_Hour_Minute_Second, for example:SuperSoC_Mdump-0010-2025_08_13_20_25_11. -
When the MCU encounters data abort, undefined instruction, or prefetch abort exceptions, it can dump the context information to aid in debugging.