I think that by default, the timers are paused when the CPU cores are halted by GDB. This would still allow the timer to run when the CPU is actively running but if you halt the CPU as soon as it starts up and then just keep single stepping through it, the CPU won't actually have been running much so the timer returning 0µs would make sense.
You could try adding the following to the top of your main() code to see if it changes the behavior that you are seeing:
You could try adding the following to the top of your main() code to see if it changes the behavior that you are seeing:
Code:
timer_hw->dbgpause = 0Statistics: Posted by adam_green — Wed Apr 16, 2025 7:24 pm