Skip to content

iMX-RT: sys_reboot hangs in infinite loop with CONFIG_DCACHE=y #97549

@smaherdev

Description

@smaherdev

Describe the bug

On MIMXRT1062 with Zephyr v4.2.1, sys_reboot() hangs in an infinite loop in modules\hal\cmsis_6\CMSIS\Core\Include\m-profile\armv7m_cachel1.h\SCB_DisableDCache if CONFIG_DCACHE is activated.

The relevant lines seem to be https://github.com/zephyrproject-rtos/CMSIS_6/blob/30a859f44ef8ab4dc8f84b03ed586fd16ccf9d74/CMSIS/Core/Include/m-profile/armv7m_cachel1.h#L198C5-L221C11 - removing the #if !defined(__OPTIMIZE__) makes it work again.

The relevant code section links to this issue: ARM-software/CMSIS_5#620

Regression

  • This is a regression.

Steps to reproduce

  • set CONFIG_DCACHE=y
  • build an application which calls sys_reboot() for MIMXRT1062
  • attach with west debug and see that the CPU is stuck in an infinite loop in SCB_DisableDCache

Relevant log output

-

Impact

Can't use DCACHE and sys_reboot in the same application on MIMXRT1062

Environment

  • OS: Linux
  • SDK: 0.17.1
  • Zephyr version: v4.2.1
  • cmsis_6: #06d952b6713a2ca41c9224a62075e4059402a151

Additional Context

No response

Metadata

Metadata

Assignees

Labels

bugThe issue is a bug, or the PR is fixing a bugplatform: NXPNXPpriority: mediumMedium impact/importance bug

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions