Tool/software:
Hello,
How can I obtain cpu ticks without using the debug mode counter?
What is the best way of obtaining timing programmatically? By timing I mean a subsecond high precision counter.
I have my systick executing 1024 times each second. The systickinthandler is below.
void SysTickIntHandler(void) {
g_ui32SysTickCount++;
if(g_ui32SysTickCount % 1024 == 0) {
g_ui32PosixTime++;
g_ui32SysTickCount = 0;
}
}
When I need to timestamp something I get (g_ui32SysTickCount * dt_period) + (dt_period - SysTickValueGet())
Is there any better way to do this? Is there a more practical way to keep track of time?
Best Regards,
Can