In our current project on a i.MX1062 platform (for now a MIMXRT1060-EVK, later a custom board) using the IAR EWB ARM 9.10.1 IDE, we often experience lockouts when stepping through the code.
The debugger log says something like:
- CPU status FAILED
- CPU is unpowered
- Unable to execute: driver error. After the error occurred, the program counter (PC) was
- Failed to clear breakpoint: Driver error; Debug mode got disabled
- cannot re-enable debug mode
- Cannot access ROM table
The only way out is either to hard reset the target, or to unplug and replug the I-Jet debugger (which assumedly leads to a hard reset to). Same issue when using the onboard CMSIS-DAP.
As turned out after a while, the issue only, but reproducibly occurs, if any uninitialised peripheral registers are displayed in the IDE (e.g. FlexSPI, LPSPI, SPDIF). As soon, the corresponding peripheral is clocked, everything is working fine. The issue also doesn't occur, if I just step through the code, without displaying the registers.
This is very annoying during driver development - when just these init routines are the point of interest.
The IAR support isn't aware of any issues like that (and also doesn't seem to know the platform very well). I'm not sure, if this is an IDE problem, or a limitation of the MCU, as the reference manual states for some peripherals, no access is allowed while uninitialised.
Is there anything I missed in order to resolve that problem?