We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b0311d1 commit 9a96003Copy full SHA for 9a96003
cores/nRF5/freertos/portable/CMSIS/nrf52/port_cmsis_systick.c
@@ -243,7 +243,7 @@ void vPortSuppressTicksAndSleep( TickType_t xExpectedIdleTime )
243
// If dwt cycle count is enable, adjust it as welll
244
if ( (CoreDebug->DEMCR & CoreDebug_DEMCR_TRCENA_Msk) && (DWT->CTRL & DWT_CTRL_CYCCNTENA_Msk) )
245
{
246
- DWT->CYCCNT += ((diff * 1000000) / configTICK_RATE_HZ) * 64;
+ DWT->CYCCNT += (((diff-1) * 1000000) / configTICK_RATE_HZ) * 64;
247
}
248
249
switch_req = xTaskIncrementTick();
0 commit comments