Infineon AURIX: Disable interrupts when CPU is stopped during single stepping

22-Oct-2024

Solution

1. Suspend the peripheral module in the winIDEA initialization file by uncommenting lines: 

Example:

//-----------------------
//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 | CPU Options | SoC Advanced.



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. The 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 the CPU is stopped, suspended peripheral modules are stopped, however, when the 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.

Was this answer helpful?