Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8013

General • Re: get_absolute_time() returning 0 under gdb

$
0
0
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:

Code:

timer_hw->dbgpause = 0

Statistics: Posted by adam_green — Wed Apr 16, 2025 7:24 pm



Viewing all articles
Browse latest Browse all 8013

Trending Articles