correct micro ticks

This commit is contained in:
hathach committed 2020-08-20 23:15:40 +07:00
1 parent b0311d15e0
commit 9a960037bb
1 file changed
+1 -1
@@ -243,7 +243,7 @@ void vPortSuppressTicksAndSleep( TickType_t xExpectedIdleTime )
// If dwt cycle count is enable, adjust it as welll
if ( (CoreDebug->DEMCR & CoreDebug_DEMCR_TRCENA_Msk) && (DWT->CTRL & DWT_CTRL_CYCCNTENA_Msk) )
{
DWT->CYCCNT += ((diff * 1000000) / configTICK_RATE_HZ) * 64;
DWT->CYCCNT += (((diff-1) * 1000000) / configTICK_RATE_HZ) * 64;
}
switch_req = xTaskIncrementTick();