1. Suspend the peripheral module in the winIDEA initialization file by uncommenting lines:
//GTM suspend control
A GTM_CLC L 0x00000000
A GTM_OCS L 0x12000000
STM (System Timer Module) is suspended by default.
2. Enable option Clear ICR.IE when CPU stopped in Hardware menu / CPU Options / SoC Advanced tab.
By default peripheral modules in the winIDEA initialization files are not suspended (except STM), therefore these modules (e.g. GTM - Generic Timer Module) have to be suspended by uncommenting lines in the initialization file. After that stepping through the C source code can start. Debugger removes a breakpoint at a current location, sets a breakpoint at the next location (next source line) and runs the CPU. This means when CPU is stopped, suspended peripheral modules are stopped, however when CPU runs, suspended peripheral modules are running. Keep in mind that between two consecutive source lines can be between 1 and 1000 or tens of 1000 assembler lines or megabytes of code that is executed.
Sorry this article didn't answer your question, we'd love to hear how we can improve it.
Note: This form won't submit a case. We'll just use it to make this article better.