According to iMX8QM_RM_Rev_E Section 7.10.4.2.5:
If DBGEN bit is not set for GPT_CR register then GPT timer is halted.
But in my case GPT Timer counter continue running even though DBGEN is 0 and code execution is stopped using debugger.
What could be the reason?
In debug mode, PWM has the option of continuing to run or be halted.
If the DBGEN bit is not set in the PWM_PWMCR, the PWM is halted.
If the DBGEN bit is set, then the PWM will continue to run in the debug mode.