update update_perf_counter

This commit is contained in:
Gabriel Wang 2022-07-08 11:17:13 +01:00
parent bb7862f442
commit 5d567b94e9
3 changed files with 5 additions and 0 deletions

Binary file not shown.

Binary file not shown.

View File

@ -215,6 +215,11 @@ void update_perf_counter(void)
{
s_nUSUnit = SystemCoreClock / 1000000ul;
s_nMSUnit = SystemCoreClock / 1000ul;
__IRQ_SAFE {
g_lLastTimeStamp = get_system_ticks();
g_nOffset = get_system_ticks() - g_lLastTimeStamp;
}
}