Skip to content
Permalink
Browse files

fix for low-power timer usage in tickless idle mode

  • Loading branch information...
ErichStyger committed Aug 23, 2014
1 parent 1e62856 commit d6cce3ef3fa4f688b6994ebebca8cd203a5a6bea
Showing with 4 additions and 1 deletion.
  1. +4 −1 Drivers/freeRTOS/port.c
@@ -892,8 +892,11 @@ void vPortSuppressTicksAndSleep(TickType_t xExpectedIdleTime) {
* periods (not the ulReload value which accounted for part ticks).
*/
GET_TICK_CURRENT_VAL(&tmp);
#if COUNTS_UP
ulCompletedSysTickIncrements = tmp;
#else
ulCompletedSysTickIncrements = (xExpectedIdleTime*UL_TIMER_COUNTS_FOR_ONE_TICK)-tmp;

#endif
/* How many complete tick periods passed while the processor was waiting? */
ulCompleteTickPeriods = ulCompletedSysTickIncrements/UL_TIMER_COUNTS_FOR_ONE_TICK;

0 comments on commit d6cce3e

Please sign in to comment.
You can’t perform that action at this time.