-
Notifications
You must be signed in to change notification settings - Fork 7.4k
S32K344 halts after a period of time #89852
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi @cmoser-crl! We appreciate you submitting your first issue for our open-source project. 🌟 Even though I'm a bot, I can assure you that the whole community is genuinely grateful for your time and effort. 🤖💙 |
Hi @cmoser-crl , this may be related to Cortex-M core trying to make speculative access to certain memory address that do not allow to be read. Would you mind trying this patch with your sample and feedback if the issue still persist?
|
Hi @manuargue, thanks for the response - I rebuilt my sample application with this patch. It's made it past the previous point that it was hanging. I'll leave it running for a few days and update this issue with the results |
Due to erratum ERR011573, speculative accesses might be performed to normal memory unmapped in the MPU. This can be avoided by using MPU region 0 to cover all unmapped memory and make this region execute-never and inaccessible. Fixes zephyrproject-rtos#89852 Co-authored-by: Peter van der Perk <peter.vanderperk@nxp.com> Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
This patch fixed the issue I was seeing. I checked this morning and the MCU has been running fine for the last 4 days. |
thanks for the feedback @cmoser-crl , I'll open a pr with this patch |
Due to erratum ERR011573, speculative accesses might be performed to normal memory unmapped in the MPU. This can be avoided by using MPU region 0 to cover all unmapped memory and make this region execute-never and inaccessible. Fixes zephyrproject-rtos#89852 Co-authored-by: Peter van der Perk <peter.vanderperk@nxp.com> Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
Due to erratum ERR011573, speculative accesses might be performed to normal memory unmapped in the MPU. This can be avoided by using MPU region 0 to cover all unmapped memory and make this region execute-never and inaccessible. Fixes zephyrproject-rtos#89852 Co-authored-by: Peter van der Perk <peter.vanderperk@nxp.com> Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
Due to erratum ERR011573, speculative accesses might be performed to normal memory unmapped in the MPU. This can be avoided by using MPU region 0 to cover all unmapped memory and make this region execute-never and inaccessible. Fixes #89852 Co-authored-by: Peter van der Perk <peter.vanderperk@nxp.com> Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
Due to erratum ERR011573, speculative accesses might be performed to normal memory unmapped in the MPU. This can be avoided by using MPU region 0 to cover all unmapped memory and make this region execute-never and inaccessible. Fixes zephyrproject-rtos#89852 Co-authored-by: Peter van der Perk <peter.vanderperk@nxp.com> Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
Describe the bug
I'm working on an application for the NXP S32K344 and am currently using the MR-CANHUBK3 board for development. After a period of time, the MCU appears to halt/hang. The time it takes to fail is consistent across reboots for a given program. Initially, I thought the issue was with Logging/UART output as it seems to occur faster when that's enabled, but after more testing, it also happens with it disabled.
I've tried to do some debugging with Trace32. After the issue occurs, I'm not able to pause the processor with the break command. If I use the ITM trace with PC sampler, it looks like the cpu hangs on an instruction in the main thread. The instruction it hangs on varries across runs. The cpu continues handling the systick interrupts and then hangs each time it returns to the main thread. Other interrupts such as GPIO interrupts are also handled. After the issue occurs, I'm still able to view the peripheral registers in Trace32 and I've comfirmed that the safety peripherals haven't caused a functional reset.
If I disable threading with
CONFIG_MULTITHREADING=n
or disable data cache withCONFIG_DCACHE=n
, the issue doesn't appear to occur. I've run builds with both for over 48 hours without any issue.To Reproduce
I've created a repo here that consistently reproduces the issue after about a minute. I've also tested with the
samples/basic/blinky
sample program and the issue occurs after ~8.5 hours.Expected behavior
MCU shouldn't halt/hang.
Impact
We're able to work around it by modifying existing drivers to not use threads, but it's a pretty big annoyance.
Logs and console output
Environment
Additional context
All of the testing was done with the FS26 SBC in Debug mode.
I've tested the same code on a Teensy (MIMXRT1062, also Cortex M7) without seeing this issue.
The text was updated successfully, but these errors were encountered: