Unpredictable CPU behavior due to unintended memory reads

17-Oct-2024

If the CPU starts to behave unpredictably (e.g., the debug session status changes from the expected state RUN or STOP to SoC Attaching or Initialized), ensure you are not making any unintended memory reads.


Possible solution

 Close all debug windows and see if this resolves the problem. This will help you identify which debug window is performing the problematic memory reads.


Possible causes

Memory reads to undefined memory regions may cause the CPU debug to fail. Such issues are most commonly caused by:

  • Opening Memory window in undefined memory space, eg. wrong address range, non-initialized RAM with EC, or access via a wrong memory bus.
  • Viewing SFR groups for the peripherals, which are not yet enabled (not powered or clocked).
  • Reading SFRs that affect the CPU just by being read (e.g. interrupt acknowledge registers).
  • Uninitialized pointers are listed in the Watch, Locals, and Callstack windows.
  • Scrolling through the disassembly window into an undefined memory region.


Was this answer helpful?