Connectivity Software: Implement tickless mode in FreeRTOS

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Connectivity Software: Implement tickless mode in FreeRTOS

Connectivity Software: Implement tickless mode in FreeRTOS

FreeRTOS keeps track of the elapsed time in the system by counting ticks. The tick count increases inside a periodic interrupt routine generated by one of the timers available in the host MCU. When FreeRTOS is running the Idle task hook, the microcontroller can be placed into a low power mode. Depending on the low power mode, one or more peripherals can be disabled in order to save the maximum amount of energy possible. The FreeRTOS tickless idle mode allows stopping the tick interruption during the idle periods. Stopping the tick interrupt allows the microcontroller to remain in a deep power saving state until a wake-up event occurs.

The application needs to configure the module (timer, ADC, etc…) that will wake up the microcontroller before the next FreeRTOS task needs to be executed. For this purpose, during the execution of vPortSuppressTicksAndSleep, a function called by FreeRTOS when tickless idle is enabled, the maximum amount of time the MCU can remain asleep is passed as an input parameter in order to properly configure the wake-up module. Once the MCU wakes up and the FreeRTOS tick interrupt is restarted, the number of tick counts lost while the MCU was asleep must be restored.

Tickless mode is not enabled by default in the Connectivity Software FreeRTOS demos. In this post, we will show how to enable it. For this example, we will use QN9080x to demonstrate the implementation.

lowpower‌

freertos tickless‌

tickless‌

Changes where implemented in the following files:

\framework\LowPower\Source\QN908XC\PWR.c

\framework\LowPower\Interface\QN908XC\PWR_Interface.h

\freertos\fsl_tickless_generic.h

\source\common\ApplMain.c

The following file was removed from the project

fsl_tickless_qn_rtc.c

PWR.C and PWR_Interface.h

Changes in this files are intended to prepare the QN9080 for waking up using the RTC timer. Other parts, like MKW41Z, might enable other modules for this purpose (like LPTMR) and changes on this files might not be necessary.

*** PWR.c ***

Add the driver for RTC. This is the timer we will use to wake up the QN908x

/*Tickless: Add RTC driver for tickless support */
#include "fsl_rtc.h"‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

Add local variables

uint64_t mLpmTotalSleepDuration;        //Tickless
uint8_t mPWR_DeepSleepTimeUpdated = 0;  //Tickless: Coexistence with TMR manager‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

Add private functions

 uint32_t PWR_RTCGetMsTimeUntilNextTick (void);         //Tickless
 void PWR_RTCSetWakeupTimeMs (uint32_t wakeupTimeMs);   //Tickless
 void PWR_RTCWakeupStart (void);                        //Tickless‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

Make the following changes in PWR.C. All the required changes are marked as comments with "Start" where the change starts, and with "End where the change ends"

#if (cPWR_UsePowerDownMode && (cPWR_EnableDeepSleepMode_1 || cPWR_EnableDeepSleepMode_2 || cPWR_EnableDeepSleepMode_3 || cPWR_EnableDeepSleepMode_4))
static void PWR_HandleDeepSleepMode_1_2_3_4(void)
{
#if cPWR_BLE_LL_Enable
    uint8_t   power_down_mode = 0xff;
    bool_t    enterLowPower = TRUE;

    __disable_irq();

/****************START***********************************/
    /*Tickless: Configure wakeup timer */
    if(mPWR_DeepSleepTimeUpdated){
      PWR_RTCSetWakeupTimeMs(mPWR_DeepSleepTimeMs);
      mPWR_DeepSleepTimeUpdated = FALSE;        // Coexistence with TMR Manager
    }
    
    PWR_RTCWakeupStart();
/*****************END**************************************/

    PWRLib_ClearWakeupReason();

    //Try to put BLE in deep sleep mode
    power_down_mode = BLE_sleep();
    if (power_down_mode < kPmPowerDown0)
    {
        enterLowPower = false; // BLE doesn't allow deep sleep
    }
    //no else - enterLowPower is already true

    if(enterLowPower)
    {

/****************START**************************/
        uint32_t freeRunningRtcPriority;
/****************END****************************/

        NVIC_ClearPendingIRQ(OSC_INT_LOW_IRQn);
        NVIC_EnableIRQ(OSC_INT_LOW_IRQn);
        while (SYSCON_SYS_STAT_OSC_EN_MASK & SYSCON->SYS_STAT) //wait for BLE to enter sleep
        {
            POWER_EnterSleep();
        }
        NVIC_DisableIRQ(OSC_INT_LOW_IRQn);

        if(gpfPWR_LowPowerEnterCb != NULL)
        {
            gpfPWR_LowPowerEnterCb();
        }

/* Disable SysTick counter and interrupt */
        sysTickCtrl = SysTick->CTRL & (SysTick_CTRL_ENABLE_Msk | SysTick_CTRL_TICKINT_Msk);
        SysTick->CTRL &= ~(SysTick_CTRL_ENABLE_Msk | SysTick_CTRL_TICKINT_Msk);
        ICSR |= (1 << 25); // clear PendSysTick bit in ICSR, if set

/************************START***********************************/
        NVIC_ClearPendingIRQ(RTC_FR_IRQn);
        freeRunningRtcPriority = NVIC_GetPriority(RTC_FR_IRQn);
        NVIC_SetPriority(RTC_FR_IRQn,0);
/***********************END***************************************/

        POWER_EnterPowerDown(0); //Nighty night!

/************************START**********************************/
        NVIC_SetPriority(RTC_FR_IRQn,freeRunningRtcPriority);
/************************END************************************/

        if(gpfPWR_LowPowerExitCb != NULL)
        {
            gpfPWR_LowPowerExitCb();
        }

        /* Restore the state of SysTick */
        SysTick->CTRL |= sysTickCtrl;

        PWRLib_UpdateWakeupReason();
    }

    __enable_irq();

#else
    PWRLib_ClearWakeupReason();
#endif /* cPWR_BLE_LL_Enable */
}
#endif /* (cPWR_UsePowerDownMode && cPWR_EnableDeepSleepMode_1) */

‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

void PWR_SetDeepSleepTimeInMs(uint32_t deepSleepTimeMs)
{
#if (cPWR_UsePowerDownMode)
    if(deepSleepTimeMs == 0)
    {
        return;
    }

    mPWR_DeepSleepTimeMs = deepSleepTimeMs;
/****************START******************/
    mPWR_DeepSleepTimeUpdated = TRUE;
/****************END*********************/
#else
    (void) deepSleepTimeMs;
#endif /* (cPWR_UsePowerDownMode) */
}‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

Add/replace the following function definitions at the end of the file

/*---------------------------------------------------------------------------
* Name: PWR_GetTotalSleepDurationMS
* Description: -
* Parameters: -
* Return: -
*---------------------------------------------------------------------------*/
uint32_t PWR_GetTotalSleepDurationMS(void)
{
    uint32_t time;
    uint32_t currentSleepTime;

    OSA_InterruptDisable();
    currentSleepTime = RTC_GetFreeRunningInterruptThreshold(RTC);
    if(currentSleepTime >= mLpmTotalSleepDuration){
    time = (currentSleepTime-mLpmTotalSleepDuration)*1000/CLOCK_GetFreq(kCLOCK_32KClk);
    }
    else{
    time = ((0x100000000-mLpmTotalSleepDuration)+currentSleepTime)*1000/CLOCK_GetFreq(kCLOCK_32KClk);
    }
    OSA_InterruptEnable();

    return time;
}

/*---------------------------------------------------------------------------
* Name: PWR_ResetTotalSleepDuration
* Description: -
* Parameters: -
* Return: -
*---------------------------------------------------------------------------*/
void PWR_ResetTotalSleepDuration(void)
{
    OSA_InterruptDisable();
    mLpmTotalSleepDuration = RTC_GetFreeRunningCount(RTC);
    OSA_InterruptEnable();
}

/*---------------------------------------------------------------------------
* Name: PWR_RTCGetMsTimeUntilNextTick
* Description: -
* Parameters: -
* Return: Time until next tick in mS
*---------------------------------------------------------------------------*/
uint32_t PWR_RTCGetMsTimeUntilNextTick (void)
{
    uint32_t time;
    uint32_t currentRtcCounts, thresholdRtcCounts;

    OSA_InterruptDisable();
    currentRtcCounts = RTC_GetFreeRunningCount(RTC);
    thresholdRtcCounts = RTC_GetFreeRunningResetThreshold(RTC);
    if(thresholdRtcCounts > currentRtcCounts){
    time = (thresholdRtcCounts-currentRtcCounts)*1000/CLOCK_GetFreq(kCLOCK_32KClk);
    }
    else{
    time = ((0x100000000-currentRtcCounts)+thresholdRtcCounts)*1000/CLOCK_GetFreq(kCLOCK_32KClk);
    }
    OSA_InterruptEnable();

    return time;
}

/*---------------------------------------------------------------------------
* Name: PWR_RTCSetWakeupTimeMs
* Description: -
* Parameters: wakeupTimeMs: New wakeup time in milliseconds
* Return: -
*---------------------------------------------------------------------------*/
void PWR_RTCSetWakeupTimeMs (uint32_t wakeupTimeMs){
    uint32_t wakeupTimeTicks;
    uint32_t thresholdValue;

    wakeupTimeTicks = (wakeupTimeMs*CLOCK_GetFreq(kCLOCK_32KClk))/1000;
    thresholdValue = RTC_GetFreeRunningCount(RTC);
    thresholdValue += wakeupTimeTicks;
    RTC_SetFreeRunningInterruptThreshold(RTC, thresholdValue);
}

/*---------------------------------------------------------------------------
* Name: PWR_RTCWakeupStart
* Description: -
* Parameters: -
* Return: -
*---------------------------------------------------------------------------*/
void PWR_RTCWakeupStart (void){
  if(!(RTC->CNT2_CTRL & RTC_CNT2_CTRL_CNT2_EN_MASK)){
    RTC->CNT2_CTRL |= 0x52850000 | RTC_CNT2_CTRL_CNT2_EN_MASK | RTC_CNT2_CTRL_CNT2_WAKEUP_MASK | RTC_CNT2_CTRL_CNT2_INT_EN_MASK;
  }
  else{
    RTC->CNT2_CTRL |= 0x52850000 | RTC_CNT2_CTRL_CNT2_WAKEUP_MASK | RTC_CNT2_CTRL_CNT2_INT_EN_MASK;
  }
}
‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

 *** PWR_Interface.h ***

Add the following function declarations at the end of the file

/*---------------------------------------------------------------------------
* Name: PWR_GetTotalSleepDurationMS
* Description: -
* Parameters: -
* Return: -
*---------------------------------------------------------------------------*/
uint32_t PWR_GetTotalSleepDurationMS(void);

/*---------------------------------------------------------------------------
* Name: PWR_ResetTotalSleepDuration
* Description: -
* Parameters: -
* Return: -
*---------------------------------------------------------------------------*/
void PWR_ResetTotalSleepDuration(void);

#ifdef __cplusplus
}
#endif

#endif /* _PWR_INTERFACE_H_ */
‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

FSL_TICKLESS_GENERIC

The following changes have the purpose of preparing the system for recovering the missed ticks during the low power period.

Make the following changes in fsl_tickless_generic.h. All the required changes are marked as comments with "Start" where the change starts, and with "End where the change ends"

/* QN_RTC: The RTC free running is a 32-bit counter. */
#define portMAX_32_BIT_NUMBER (0xffffffffUL)
#define portRTC_CLK_HZ (0x8000UL)

/* A fiddle factor to estimate the number of SysTick counts that would have
occurred while the SysTick counter is stopped during tickless idle
calculations. */
#define portMISSED_COUNTS_FACTOR (45UL)

/*
 * The number of SysTick increments that make up one tick period.
 */
/****************************START**************************/
#if configUSE_TICKLESS_IDLE == 1
    static uint32_t ulTimerCountsForOneTick;
#endif /* configUSE_TICKLESS_IDLE */
/************************END*********************************/

/*
 * Setup the timer to generate the tick interrupts.
 */
void vPortSetupTimerInterrupt(void);

#ifdef __cplusplus
}
#endif

#endif /* FSL_TICKLESS_GENERIC_H */
‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

ApplMain.c

This is the main application file. Here is where we will call the proper APIs to enter the MCU in low power mode and perform the tick recovery sequence.

Include RTC and FreeRTOS header files needed

/*Tickless: Include RTC and FreeRTOS header files */
#include "fsl_rtc.h"
#include "fsl_tickless_generic.h"
#include "FreeRTOS.h"
#include "task.h"‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

QN9080 includes several low power modes. Sleep mode maintains most of the modules active. Power Down modes turn off most of the modules but allow the user to configure some modules to remain active to wake the MCU up when necessary. Using tickless FreeRTOS involves having to wake-up by some timer before the next ready task has to execute. For QN908x this timer will be the RTC which requires the 32.768kHz oscillator to remain active. We will change the Connectivity Software Power Lib to use Deep Sleep mode 3 (Power Down mode 0 for QN908x) which maintains the 32.768kHz oscillator on. This change is implemented in the main_task function.

#if !defined(MULTICORE_BLACKBOX)
        /* BLE Host Stack Init */
        if (Ble_Initialize(App_GenericCallback) != gBleSuccess_c)
        {
            panic(0,0,0,0);
            return;
        }
#endif /* MULTICORE_BLACKBOX */

/*************** Start ****************/
#if (cPWR_UsePowerDownMode)
    PWR_ChangeDeepSleepMode(3);
#endif
/*************** End ****************/
    }
    
    /* Call application task */
    App_Thread( param );
}‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

 

Also, tickless FreeRTOS requires a special Idle function which takes as an input parameter the amount of RTOS ticks the MCU can remain asleep before the next task needs to be executed. The following changes disable the default Idle function provided in the Connectivity Software demos when the tickless mode is enabled.

/************************************************************************************
*************************************************************************************
* Private prototypes
*************************************************************************************
************************************************************************************/
#if (cPWR_UsePowerDownMode || gAppUseNvm_d)
#if (mAppIdleHook_c)
    #define AppIdle_TaskInit()
    #define App_Idle_Task()
#else
#if (!configUSE_TICKLESS_IDLE)
    static osaStatus_t AppIdle_TaskInit(void);
    static void App_Idle_Task(osaTaskParam_t argument);
#endif // configUSE_TICKLESS_IDLE
#endif
#endif
/************************************************************************************
*************************************************************************************
* Private memory declarations
*************************************************************************************
************************************************************************************/

/******************************** Start ******************************/
#if ((cPWR_UsePowerDownMode || gAppUseNvm_d) && !configUSE_TICKLESS_IDLE)
/******************************** End ******************************/
#if (!mAppIdleHook_c)
OSA_TASK_DEFINE( App_Idle_Task, gAppIdleTaskPriority_c, 1, gAppIdleTaskStackSize_c, FALSE );
osaTaskId_t gAppIdleTaskId = 0;
#endif
#endif  /* cPWR_UsePowerDownMode */‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍
#if !gUseHciTransportDownward_d
        pfBLE_SignalFromISR = BLE_SignalFromISRCallback;
#endif /* !gUseHciTransportDownward_d */

/**************************** Start ************************/
#if ((cPWR_UsePowerDownMode || gAppUseNvm_d) && !configUSE_TICKLESS_IDLE)
/**************************** End ************************/
#if (!mAppIdleHook_c)
        AppIdle_TaskInit();
#endif
#endif‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍
/***************************START**************************/
#if (cPWR_UsePowerDownMode && !configUSE_TICKLESS_IDLE)
/******************************END***************************/
static void App_Idle(void)
{
    PWRLib_WakeupReason_t wakeupReason;

    if( PWR_CheckIfDeviceCanGoToSleep() )
    {
        /* Enter Low Power */
        wakeupReason = PWR_EnterLowPower();

#if gFSCI_IncludeLpmCommands_c
        /* Send Wake Up indication to FSCI */
        FSCI_SendWakeUpIndication();
#endif

#if gKBD_KeysCount_c > 0
        /* Woke up on Keyboard Press */
        if(wakeupReason.Bits.FromKeyBoard)
        {
            KBD_SwitchPressedOnWakeUp();
            PWR_DisallowDeviceToSleep();
        }
#endif
    }
    else
    {
        /* Enter MCU Sleep */
        PWR_EnterSleep();
    }
}
#endif /* cPWR_UsePowerDownMode */

#if (mAppIdleHook_c)

void vApplicationIdleHook(void)
{
#if (gAppUseNvm_d)
    NvIdle();
#endif

/*******************************START****************************/
#if (cPWR_UsePowerDownMode && !configUSE_TICKLESS_IDLE)
/*********************************END*******************************/
    App_Idle();
#endif
}

#else /* mAppIdleHook_c */

/******************************* START ****************************/
#if ((cPWR_UsePowerDownMode || gAppUseNvm_d) && !configUSE_TICKLESS_IDLE)
/******************************* END ****************************/
static void App_Idle_Task(osaTaskParam_t argument)
{
    while(1)
    {   
#if gAppUseNvm_d
        NvIdle();
#endif
        
#if (cPWR_UsePowerDownMode)
        App_Idle();
#endif

        /* For BareMetal break the while(1) after 1 run */
        if (gUseRtos_c == 0)
        {
            break;
        }
    }
}
‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

Once the default Idle function has been disabled, the special Idle function must be implemented. Add the following code at the end of the ApplMain.c file.

/*Tickless: Implement Tickless Idle */
#if (cPWR_UsePowerDownMode && configUSE_TICKLESS_IDLE)
extern void vPortSuppressTicksAndSleep( TickType_t xExpectedIdleTime )
{


    uint32_t time_ms = xExpectedIdleTime * portTICK_PERIOD_MS;
    uint32_t tmrMgrExpiryTimeMs;

    ulTimerCountsForOneTick = 160000;//VALUE OF THE SYSTICK 10 ms

#if (cPWR_UsePowerDownMode)
    PWRLib_WakeupReason_t wakeupReason;
    
    //TMR_MGR: Get next timer manager expiry time
    tmrMgrExpiryTimeMs = TMR_GetFirstExpireTime(gTmrAllTypes_c);

    // TMR_MGR: Update RTC Threshold only if RTOS needs to wakeup earlier
    if(time_ms<tmrMgrExpiryTimeMs){
      PWR_SetDeepSleepTimeInMs(time_ms);
    }
    
    PWR_ResetTotalSleepDuration();

    if( PWR_CheckIfDeviceCanGoToSleep() )
    {
        wakeupReason = PWR_EnterLowPower();
        
        //Fix: All the tick recovery stuff should only happen if device entered in DSM
        xExpectedIdleTime = PWR_GetTotalSleepDurationMS() / portTICK_PERIOD_MS;     // Fix: ticks = time in mS asleep / mS per each tick (portTICK_PERIOD_MS)

        /* Restart SysTick so it runs from portNVIC_SYSTICK_LOAD_REG
        again, then set portNVIC_SYSTICK_LOAD_REG back to its standard
        value. The critical section is used to ensure the tick interrupt
        can only execute once in the case that the reload register is near
        zero. */
        portNVIC_SYSTICK_CURRENT_VALUE_REG = 0UL;
        portENTER_CRITICAL();

        portNVIC_SYSTICK_CTRL_REG |= portNVIC_SYSTICK_ENABLE_BIT; 
        vTaskStepTick( xExpectedIdleTime );
        portNVIC_SYSTICK_LOAD_REG = ulTimerCountsForOneTick - 1UL; 

        portEXIT_CRITICAL();

#if gKBD_KeysCount_c > 0
        /* Woke up on Keyboard Press */
        if(wakeupReason.Bits.FromKeyBoard)
        { 
          KBD_SwitchPressedOnWakeUp();
          PWR_DisallowDeviceToSleep(); 
        }
#endif
    }
    else
    { 
      /* Enter MCU Sleep */ 
      PWR_EnterSleep(); 
    }


#endif /* cPWR_UsePowerDownMode */

}

#endif  //cPWR_UsePowerDownMode && configUSE_TICKLESS_IDLE
‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

From the previous function, the value of ulTimerCountsForOneTick is used to restore the count of the RTOS tick timer after waking up. This value depends on the RTOS Tick interval defined in FreeRTOSConfig.h and is calculated using the following formula:

SYST_RNR  =  F_Systick_CLK(Hz) * T_FreeRTOS_Ticks(ms)

Where:

  •       F_Systick_CLK(Hz) = AHB or 32KHz of the SYST_CSR selection
  •       T_FreeRTOS_Ticks(ms) = tick count value.

FreeRTOSConfig.h

Finally, on the FreeRTOSConfig.h file, make sure that configUSE_TICKLESS_IDLE is set to 1

 * See http://www.freertos.org/a00110.html.
 *----------------------------------------------------------*/

#define configUSE_PREEMPTION                    1
#define configUSE_TICKLESS_IDLE                 1 //<--- /***** Start *****/
#define configCPU_CLOCK_HZ                      (SystemCoreClock)
#define configTICK_RATE_HZ                      ((TickType_t)100)
#define configMAX_PRIORITIES                    (18)
#define configMINIMAL_STACK_SIZE                ((unsigned short)90)‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

Testing Tickless RTOS

In order to test if tickless support was successfully added, an example application that toggles an LED is implemented. This application configures an RTOS timer to toggle the LED once every 500mS and enter the MCU in DSM3 during the idle time. The Power Profiling demo was used for this purpose.

power_profiling.c

Make sure you have included the following header files

#include "FreeRTOS.h"
#include "task.h"‍‍

Create an RTOS task for blinking the LED every 500mS. First, declare the task function, task ID and the task itself.

void vfnTaskLedBlinkTest(void* param); //New Task Definition
OSA_TASK_DEFINE(vfnTaskLedBlinkTest, 1, 1, 500, FALSE );
osaTaskId_t gAppTestTask1Id = 0; // TestTask1 Id‍‍‍

Create the new task inside the BleApp_Init function

void BleApp_Init(void)

{
    PWR_AllowDeviceToSleep();

    mPowerState = 0;   // Board starts with PD1 enabled
    /******************* Start *****************/
    gAppTestTask1Id = OSA_TaskCreate(OSA_TASK(vfnTaskLedBlinkTest), NULL); //Task Creation 
    /*******************  End  *****************/

}‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

Finally, add the task function definition at the end of the file.

void vfnTaskLedBlinkTest(void* param)
{
    uint16_t wTimeValue = 500; //500ms

    while(1)
    {
        LED_BLUE_TOGGLE();
        vTaskDelay(pdMS_TO_TICKS(wTimeValue));
    } 
}‍‍‍‍‍‍‍‍‍‍

We can monitor the power consumption in MCUXpresso IDE, with the Power Measurement Tool. With it, we can see the current that is been consumed and prove that the implementation is working as the expected.

Configure the Power Measurement Tool

pastedImage_84.png

Consumed current

pastedImage_85.png

Labels (1)
Comments

Can this guide be updated for the latest SDK, there appears to be partial support for tickless mode implemented in the SDK for QN9080?

Hi:

Latest SDK v2.2 has support tickless of freertos, need enable  below macro in  app_preinclude.h

configUSE_TICKLESS_IDLE:为1
以下定义用于计算tickless消逝时间
/* RTC is not operating in PD1, so disable RTC related code in PWR module */
#define cPWR_EnableLpTmrRunning 1
#define cPWR_EnablePD0RtcInterrupt 1

Which example is it best to use to test tickless freertos and low power operation?

Temperature sensor example appears to work in tickless mode..

Slightly higher sleep consumption versus the power profile example though

power profile could reach reasonable power consumption, even in tickless mode or bareboard mode.

However, there is one trap, need take care.

If recovery from power mode PD1, in tickless idle task, which has closed 32K OSC before sleep,  PWRLib_LPTMR_Stop  will crash to operate unpower peripherals.

if Power mode is PD0, the issue couldn't be seen for OSC working and stay powered during sleep.

1.PNG

How to fix:

Judge recovery from PD1 or PD0.

Capture.PNG

%3CLINGO-SUB%20id%3D%22lingo-sub-1113049%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EConnectivity%20Software%3A%20Implement%20tickless%20mode%20in%20FreeRTOS%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1113049%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%20style%3D%22text-align%3A%20justify%3B%22%3EFreeRTOS%20keeps%20track%20of%20the%20elapsed%20time%20in%20the%20system%20by%20counting%20ticks.%20The%20tick%20count%20increases%20inside%20a%20periodic%20interrupt%20routine%20generated%20by%20one%20of%20the%20timers%20available%20in%20the%20host%20MCU.%20When%20FreeRTOS%20is%20running%20the%20Idle%20task%20hook%2C%20the%20microcontroller%20can%20be%20placed%20into%20a%20low%20power%20mode.%20Depending%20on%20the%20low%20power%20mode%2C%20one%20or%20more%20peripherals%20can%20be%20disabled%20in%20order%20to%20save%20the%20maximum%20amount%20of%20energy%20possible.%20The%20FreeRTOS%20tickless%20idle%20mode%20allows%20stopping%20the%20tick%20interruption%20during%20the%20idle%20periods.%20Stopping%20the%20tick%20interrupt%20allows%20the%20microcontroller%20to%20remain%20in%20a%20deep%20power%20saving%20state%20until%20a%20wake-up%20event%20occurs.%3C%2FP%3E%3CP%20style%3D%22text-align%3A%20justify%3B%22%3E%3C%2FP%3E%3CP%20style%3D%22text-align%3A%20justify%3B%22%3EThe%20application%20needs%20to%20configure%20the%20module%20(timer%2C%20ADC%2C%20etc%E2%80%A6)%20that%20will%20wake%20up%20the%20microcontroller%20before%20the%20next%20FreeRTOS%20task%20needs%20to%20be%20executed.%20For%20this%20purpose%2C%20during%20the%20execution%20of%20vPortSuppressTicksAndSleep%2C%20a%20function%20called%20by%20FreeRTOS%20when%20tickless%20idle%20is%20enabled%2C%20the%20maximum%20amount%20of%20time%20the%20MCU%20can%20remain%20asleep%20is%20passed%20as%20an%20input%20parameter%20in%20order%20to%20properly%20configure%20the%20wake-up%20module.%20Once%20the%20MCU%20wakes%20up%20and%20the%20FreeRTOS%20tick%20interrupt%20is%20restarted%2C%20the%20number%20of%20tick%20counts%20lost%20while%20the%20MCU%20was%20asleep%20must%20be%20restored.%3C%2FP%3E%3CP%20style%3D%22text-align%3A%20justify%3B%22%3E%3C%2FP%3E%3CP%20style%3D%22text-align%3A%20justify%3B%22%3ETickless%20mode%20is%20not%20enabled%20by%20default%20in%20the%20Connectivity%20Software%20FreeRTOS%20demos.%20In%20this%20post%2C%20we%20will%3CSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FSTRONG%3Eshow%20how%20to%20enable%20it.%20For%20this%20example%2C%20we%20will%20use%20QN9080x%20to%20demonstrate%20the%20implementation.%3C%2FP%3E%3CP%20style%3D%22text-align%3A%20justify%3B%22%3E%3C%2FP%3E%3CP%20style%3D%22text-align%3A%20justify%3B%22%3Elowpower%E2%80%8C%3C%2FP%3E%3CP%20style%3D%22text-align%3A%20justify%3B%22%3Efreertos%20tickless%E2%80%8C%3C%2FP%3E%3CP%20style%3D%22text-align%3A%20justify%3B%22%3Etickless%E2%80%8C%3C%2FP%3E%3CP%20style%3D%22text-align%3A%20justify%3B%22%3E%3C%2FP%3E%3CP%3EChanges%20where%20implemented%20in%20the%20following%20files%3A%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3E%5Cframework%5CLowPower%5CSource%5CQN908XC%5CPWR.c%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3E%5Cframework%5CLowPower%5CInterface%5CQN908XC%5CPWR_Interface.h%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3E%5Cfreertos%5Cfsl_tickless_generic.h%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3E%5Csource%5Ccommon%5CApplMain.c%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EThe%20following%20file%20was%20removed%20from%20the%20project%3C%2FP%3E%3CP%3E%3CSTRONG%3Efsl_tickless_qn_rtc.c%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CH1%20id%3D%22toc-hId-381498002%22%20id%3D%22toc-hId-381498002%22%20id%3D%22toc-hId-1297816214%22%3EPWR.C%20and%20PWR_Interface.h%3C%2FH1%3E%3CP%3EChanges%20in%20this%20files%20are%20intended%20to%20prepare%20the%20QN9080%20for%20waking%20up%20using%20the%20RTC%20timer.%20Other%20parts%2C%20like%20MKW41Z%2C%20might%20enable%20other%20modules%20for%20this%20purpose%20(like%20LPTMR)%20and%20changes%20on%20this%20files%20might%20not%20be%20necessary.%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%20style%3D%22font-weight%3A%20400%3B%22%3E%3CSTRONG%3E***%20PWR.c%20***%3C%2FSTRONG%3E%3C%2FP%3E%3CP%20style%3D%22font-weight%3A%20400%3B%22%3EAdd%26nbsp%3Bthe%20driver%20for%20RTC.%20This%20is%20the%20timer%20we%20will%20use%20to%20wake%20up%20the%20QN908x%3C%2FP%3E%3CPRE%20class%3D%22language-c%20line-numbers%22%3E%3CCODE%3E%3CSPAN%20class%3D%22comment%20token%22%3E%2F*Tickless%3A%20Add%20RTC%20driver%20for%20tickless%20support%20*%2F%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23include%20%3CSPAN%20class%3D%22string%20token%22%3E%22fsl_rtc.h%22%3C%2FSPAN%3E%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%3C%2FSPAN%3E%3CSPAN%20class%3D%22line-numbers-rows%22%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EAdd%20local%20variables%3C%2FSPAN%3E%3C%2FP%3E%3CPRE%20class%3D%22language-c%20line-numbers%22%3E%3CCODE%3Euint64_t%20mLpmTotalSleepDuration%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22comment%20token%22%3E%2F%2FTickless%3C%2FSPAN%3E%0Auint8_t%20mPWR_DeepSleepTimeUpdated%20%3CSPAN%20class%3D%22operator%20token%22%3E%3D%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22number%20token%22%3E0%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%26nbsp%3B%20%3CSPAN%20class%3D%22comment%20token%22%3E%2F%2FTickless%3A%20Coexistence%20with%20TMR%20manager%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%3C%2FSPAN%3E%3CSPAN%20class%3D%22line-numbers-rows%22%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2011.0pt%3B%22%3EAdd%20private%20functions%3C%2FSPAN%3E%3C%2FP%3E%3CPRE%20class%3D%22language-c%20line-numbers%22%3E%3CCODE%3E%20uint32_t%20PWR_RTCGetMsTimeUntilNextTick%20%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22keyword%20token%22%3Evoid%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22comment%20token%22%3E%2F%2FTickless%3C%2FSPAN%3E%0A%20%3CSPAN%20class%3D%22keyword%20token%22%3Evoid%3C%2FSPAN%3E%20PWR_RTCSetWakeupTimeMs%20%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3Euint32_t%20wakeupTimeMs%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22comment%20token%22%3E%2F%2FTickless%3C%2FSPAN%3E%0A%20%3CSPAN%20class%3D%22keyword%20token%22%3Evoid%3C%2FSPAN%3E%20PWR_RTCWakeupStart%20%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22keyword%20token%22%3Evoid%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22comment%20token%22%3E%2F%2FTickless%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%3C%2FSPAN%3E%3CSPAN%20class%3D%22line-numbers-rows%22%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EMake%20the%20following%20changes%20in%20PWR.C.%20All%20the%20required%20changes%20are%20marked%20as%20comments%20with%20%22Start%22%20where%20the%20change%20starts%2C%20and%20with%20%22End%20where%20the%20change%20ends%22%3C%2FSPAN%3E%3C%2FP%3E%3CPRE%20class%3D%22language-c%20line-numbers%22%3E%3CCODE%3E%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23if%20(cPWR_UsePowerDownMode%20%26amp%3B%26amp%3B%20(cPWR_EnableDeepSleepMode_1%20%7C%7C%20cPWR_EnableDeepSleepMode_2%20%7C%7C%20cPWR_EnableDeepSleepMode_3%20%7C%7C%20cPWR_EnableDeepSleepMode_4))%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22keyword%20token%22%3Estatic%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22keyword%20token%22%3Evoid%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22token%20function%22%3EPWR_HandleDeepSleepMode_1_2_3_4%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22keyword%20token%22%3Evoid%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22punctuation%20token%22%3E%7B%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23if%20cPWR_BLE_LL_Enable%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20uint8_t%26nbsp%3B%26nbsp%3B%20power_down_mode%20%3CSPAN%20class%3D%22operator%20token%22%3E%3D%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22number%20token%22%3E0xff%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20bool_t%26nbsp%3B%26nbsp%3B%26nbsp%3B%20enterLowPower%20%3CSPAN%20class%3D%22operator%20token%22%3E%3D%3C%2FSPAN%3E%20TRUE%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22token%20function%22%3E__disable_irq%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%0A%3CSPAN%20class%3D%22comment%20token%22%3E%2F****************START***********************************%2F%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22comment%20token%22%3E%2F*Tickless%3A%20Configure%20wakeup%20timer%20*%2F%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22keyword%20token%22%3Eif%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3EmPWR_DeepSleepTimeUpdated%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%7B%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22token%20function%22%3EPWR_RTCSetWakeupTimeMs%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3EmPWR_DeepSleepTimeMs%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20mPWR_DeepSleepTimeUpdated%20%3CSPAN%20class%3D%22operator%20token%22%3E%3D%3C%2FSPAN%3E%20FALSE%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22comment%20token%22%3E%2F%2F%20Coexistence%20with%20TMR%20Manager%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22punctuation%20token%22%3E%7D%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22token%20function%22%3EPWR_RTCWakeupStart%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22comment%20token%22%3E%2F*****************END**************************************%2F%3C%2FSPAN%3E%0A%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22token%20function%22%3EPWRLib_ClearWakeupReason%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22comment%20token%22%3E%2F%2FTry%20to%20put%20BLE%20in%20deep%20sleep%20mode%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20power_down_mode%20%3CSPAN%20class%3D%22operator%20token%22%3E%3D%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22token%20function%22%3EBLE_sleep%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22keyword%20token%22%3Eif%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3Epower_down_mode%20%3CSPAN%20class%3D%22operator%20token%22%3E%26lt%3B%3C%2FSPAN%3E%20kPmPowerDown0%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22punctuation%20token%22%3E%7B%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20enterLowPower%20%3CSPAN%20class%3D%22operator%20token%22%3E%3D%3C%2FSPAN%3E%20false%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22comment%20token%22%3E%2F%2F%20BLE%20doesn't%20allow%20deep%20sleep%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22punctuation%20token%22%3E%7D%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22comment%20token%22%3E%2F%2Fno%20else%20-%20enterLowPower%20is%20already%20true%3C%2FSPAN%3E%0A%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22keyword%20token%22%3Eif%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3EenterLowPower%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22punctuation%20token%22%3E%7B%3C%2FSPAN%3E%0A%0A%3CSPAN%20class%3D%22comment%20token%22%3E%2F****************START**************************%2F%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20uint32_t%20freeRunningRtcPriority%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22comment%20token%22%3E%2F****************END****************************%2F%3C%2FSPAN%3E%0A%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22token%20function%22%3ENVIC_ClearPendingIRQ%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3EOSC_INT_LOW_IRQn%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22token%20function%22%3ENVIC_EnableIRQ%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3EOSC_INT_LOW_IRQn%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22keyword%20token%22%3Ewhile%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3ESYSCON_SYS_STAT_OSC_EN_MASK%20%3CSPAN%20class%3D%22operator%20token%22%3E%26amp%3B%3C%2FSPAN%3E%20SYSCON%3CSPAN%20class%3D%22operator%20token%22%3E-%26gt%3B%3C%2FSPAN%3ESYS_STAT%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22comment%20token%22%3E%2F%2Fwait%20for%20BLE%20to%20enter%20sleep%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22punctuation%20token%22%3E%7B%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22token%20function%22%3EPOWER_EnterSleep%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22punctuation%20token%22%3E%7D%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22token%20function%22%3ENVIC_DisableIRQ%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3EOSC_INT_LOW_IRQn%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22keyword%20token%22%3Eif%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3EgpfPWR_LowPowerEnterCb%20%3CSPAN%20class%3D%22operator%20token%22%3E!%3D%3C%2FSPAN%3E%20NULL%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22punctuation%20token%22%3E%7B%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22token%20function%22%3EgpfPWR_LowPowerEnterCb%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22punctuation%20token%22%3E%7D%3C%2FSPAN%3E%0A%0A%3CSPAN%20class%3D%22comment%20token%22%3E%2F*%20Disable%20SysTick%20counter%20and%20interrupt%20*%2F%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20sysTickCtrl%20%3CSPAN%20class%3D%22operator%20token%22%3E%3D%3C%2FSPAN%3E%20SysTick%3CSPAN%20class%3D%22operator%20token%22%3E-%26gt%3B%3C%2FSPAN%3ECTRL%20%3CSPAN%20class%3D%22operator%20token%22%3E%26amp%3B%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3ESysTick_CTRL_ENABLE_Msk%20%3CSPAN%20class%3D%22operator%20token%22%3E%7C%3C%2FSPAN%3E%20SysTick_CTRL_TICKINT_Msk%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20SysTick%3CSPAN%20class%3D%22operator%20token%22%3E-%26gt%3B%3C%2FSPAN%3ECTRL%20%3CSPAN%20class%3D%22operator%20token%22%3E%26amp%3B%3C%2FSPAN%3E%3CSPAN%20class%3D%22operator%20token%22%3E%3D%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22operator%20token%22%3E~%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3ESysTick_CTRL_ENABLE_Msk%20%3CSPAN%20class%3D%22operator%20token%22%3E%7C%3C%2FSPAN%3E%20SysTick_CTRL_TICKINT_Msk%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20ICSR%20%3CSPAN%20class%3D%22operator%20token%22%3E%7C%3C%2FSPAN%3E%3CSPAN%20class%3D%22operator%20token%22%3E%3D%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22number%20token%22%3E1%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22operator%20token%22%3E%26lt%3B%26lt%3B%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22number%20token%22%3E25%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22comment%20token%22%3E%2F%2F%20clear%20PendSysTick%20bit%20in%20ICSR%2C%20if%20set%3C%2FSPAN%3E%0A%0A%3CSPAN%20class%3D%22comment%20token%22%3E%2F************************START***********************************%2F%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22token%20function%22%3ENVIC_ClearPendingIRQ%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3ERTC_FR_IRQn%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20freeRunningRtcPriority%20%3CSPAN%20class%3D%22operator%20token%22%3E%3D%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22token%20function%22%3ENVIC_GetPriority%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3ERTC_FR_IRQn%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22token%20function%22%3ENVIC_SetPriority%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3ERTC_FR_IRQn%3CSPAN%20class%3D%22punctuation%20token%22%3E%2C%3C%2FSPAN%3E%3CSPAN%20class%3D%22number%20token%22%3E0%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22comment%20token%22%3E%2F***********************END***************************************%2F%3C%2FSPAN%3E%0A%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22token%20function%22%3EPOWER_EnterPowerDown%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22number%20token%22%3E0%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22comment%20token%22%3E%2F%2FNighty%20night!%3C%2FSPAN%3E%0A%0A%3CSPAN%20class%3D%22comment%20token%22%3E%2F************************START**********************************%2F%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22token%20function%22%3ENVIC_SetPriority%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3ERTC_FR_IRQn%3CSPAN%20class%3D%22punctuation%20token%22%3E%2C%3C%2FSPAN%3EfreeRunningRtcPriority%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22comment%20token%22%3E%2F************************END************************************%2F%3C%2FSPAN%3E%0A%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22keyword%20token%22%3Eif%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3EgpfPWR_LowPowerExitCb%20%3CSPAN%20class%3D%22operator%20token%22%3E!%3D%3C%2FSPAN%3E%20NULL%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22punctuation%20token%22%3E%7B%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22token%20function%22%3EgpfPWR_LowPowerExitCb%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22punctuation%20token%22%3E%7D%3C%2FSPAN%3E%0A%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22comment%20token%22%3E%2F*%20Restore%20the%20state%20of%20SysTick%20*%2F%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20SysTick%3CSPAN%20class%3D%22operator%20token%22%3E-%26gt%3B%3C%2FSPAN%3ECTRL%20%3CSPAN%20class%3D%22operator%20token%22%3E%7C%3C%2FSPAN%3E%3CSPAN%20class%3D%22operator%20token%22%3E%3D%3C%2FSPAN%3E%20sysTickCtrl%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22token%20function%22%3EPWRLib_UpdateWakeupReason%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22punctuation%20token%22%3E%7D%3C%2FSPAN%3E%0A%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22token%20function%22%3E__enable_irq%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%0A%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23else%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22token%20function%22%3EPWRLib_ClearWakeupReason%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23endif%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22comment%20token%22%3E%2F*%20cPWR_BLE_LL_Enable%20*%2F%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22punctuation%20token%22%3E%7D%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23endif%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22comment%20token%22%3E%2F*%20(cPWR_UsePowerDownMode%20%26amp%3B%26amp%3B%20cPWR_EnableDeepSleepMode_1)%20*%2F%3C%2FSPAN%3E%0A%0A%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%3CSPAN%20class%3D%22line-numbers-rows%22%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%3C%2FP%3E%3CPRE%20class%3D%22language-c%20line-numbers%22%3E%3CCODE%3E%3CSPAN%20class%3D%22keyword%20token%22%3Evoid%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22token%20function%22%3EPWR_SetDeepSleepTimeInMs%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3Euint32_t%20deepSleepTimeMs%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22punctuation%20token%22%3E%7B%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23if%20(cPWR_UsePowerDownMode)%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22keyword%20token%22%3Eif%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3EdeepSleepTimeMs%20%3CSPAN%20class%3D%22operator%20token%22%3E%3D%3D%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22number%20token%22%3E0%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22punctuation%20token%22%3E%7B%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22keyword%20token%22%3Ereturn%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22punctuation%20token%22%3E%7D%3C%2FSPAN%3E%0A%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20mPWR_DeepSleepTimeMs%20%3CSPAN%20class%3D%22operator%20token%22%3E%3D%3C%2FSPAN%3E%20deepSleepTimeMs%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22comment%20token%22%3E%2F****************START******************%2F%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20mPWR_DeepSleepTimeUpdated%20%3CSPAN%20class%3D%22operator%20token%22%3E%3D%3C%2FSPAN%3E%20TRUE%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22comment%20token%22%3E%2F****************END*********************%2F%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23else%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22keyword%20token%22%3Evoid%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%20deepSleepTimeMs%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23endif%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22comment%20token%22%3E%2F*%20(cPWR_UsePowerDownMode)%20*%2F%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22punctuation%20token%22%3E%7D%3C%2FSPAN%3E%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%3CSPAN%20class%3D%22line-numbers-rows%22%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EAdd%2Freplace%20the%20following%20function%20definitions%20at%20the%20end%20of%20the%20file%3C%2FSPAN%3E%3C%2FP%3E%3CPRE%20class%3D%22language-c%20line-numbers%22%3E%3CCODE%3E%3CSPAN%20class%3D%22comment%20token%22%3E%2F*---------------------------------------------------------------------------%0A*%20Name%3A%20PWR_GetTotalSleepDurationMS%0A*%20Description%3A%20-%0A*%20Parameters%3A%20-%0A*%20Return%3A%20-%0A*---------------------------------------------------------------------------*%2F%3C%2FSPAN%3E%0Auint32_t%20%3CSPAN%20class%3D%22token%20function%22%3EPWR_GetTotalSleepDurationMS%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22keyword%20token%22%3Evoid%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22punctuation%20token%22%3E%7B%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20uint32_t%20time%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20uint32_t%20currentSleepTime%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22token%20function%22%3EOSA_InterruptDisable%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20currentSleepTime%20%3CSPAN%20class%3D%22operator%20token%22%3E%3D%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22token%20function%22%3ERTC_GetFreeRunningInterruptThreshold%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3ERTC%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22keyword%20token%22%3Eif%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3EcurrentSleepTime%20%3CSPAN%20class%3D%22operator%20token%22%3E%26gt%3B%3D%3C%2FSPAN%3E%20mLpmTotalSleepDuration%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%7B%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20time%20%3CSPAN%20class%3D%22operator%20token%22%3E%3D%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3EcurrentSleepTime%3CSPAN%20class%3D%22operator%20token%22%3E-%3C%2FSPAN%3EmLpmTotalSleepDuration%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22operator%20token%22%3E*%3C%2FSPAN%3E%3CSPAN%20class%3D%22number%20token%22%3E1000%3C%2FSPAN%3E%3CSPAN%20class%3D%22operator%20token%22%3E%2F%3C%2FSPAN%3E%3CSPAN%20class%3D%22token%20function%22%3ECLOCK_GetFreq%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3EkCLOCK_32KClk%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22punctuation%20token%22%3E%7D%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22keyword%20token%22%3Eelse%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%7B%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20time%20%3CSPAN%20class%3D%22operator%20token%22%3E%3D%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22number%20token%22%3E0x100000000%3C%2FSPAN%3E%3CSPAN%20class%3D%22operator%20token%22%3E-%3C%2FSPAN%3EmLpmTotalSleepDuration%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22operator%20token%22%3E%2B%3C%2FSPAN%3EcurrentSleepTime%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22operator%20token%22%3E*%3C%2FSPAN%3E%3CSPAN%20class%3D%22number%20token%22%3E1000%3C%2FSPAN%3E%3CSPAN%20class%3D%22operator%20token%22%3E%2F%3C%2FSPAN%3E%3CSPAN%20class%3D%22token%20function%22%3ECLOCK_GetFreq%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3EkCLOCK_32KClk%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22punctuation%20token%22%3E%7D%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22token%20function%22%3EOSA_InterruptEnable%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22keyword%20token%22%3Ereturn%3C%2FSPAN%3E%20time%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22punctuation%20token%22%3E%7D%3C%2FSPAN%3E%0A%0A%3CSPAN%20class%3D%22comment%20token%22%3E%2F*---------------------------------------------------------------------------%0A*%20Name%3A%20PWR_ResetTotalSleepDuration%0A*%20Description%3A%20-%0A*%20Parameters%3A%20-%0A*%20Return%3A%20-%0A*---------------------------------------------------------------------------*%2F%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22keyword%20token%22%3Evoid%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22token%20function%22%3EPWR_ResetTotalSleepDuration%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22keyword%20token%22%3Evoid%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22punctuation%20token%22%3E%7B%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22token%20function%22%3EOSA_InterruptDisable%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20mLpmTotalSleepDuration%20%3CSPAN%20class%3D%22operator%20token%22%3E%3D%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22token%20function%22%3ERTC_GetFreeRunningCount%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3ERTC%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22token%20function%22%3EOSA_InterruptEnable%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22punctuation%20token%22%3E%7D%3C%2FSPAN%3E%0A%0A%3CSPAN%20class%3D%22comment%20token%22%3E%2F*---------------------------------------------------------------------------%0A*%20Name%3A%20PWR_RTCGetMsTimeUntilNextTick%0A*%20Description%3A%20-%0A*%20Parameters%3A%20-%0A*%20Return%3A%20Time%20until%20next%20tick%20in%20mS%0A*---------------------------------------------------------------------------*%2F%3C%2FSPAN%3E%0Auint32_t%20PWR_RTCGetMsTimeUntilNextTick%20%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22keyword%20token%22%3Evoid%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22punctuation%20token%22%3E%7B%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20uint32_t%20time%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20uint32_t%20currentRtcCounts%3CSPAN%20class%3D%22punctuation%20token%22%3E%2C%3C%2FSPAN%3E%20thresholdRtcCounts%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22token%20function%22%3EOSA_InterruptDisable%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20currentRtcCounts%20%3CSPAN%20class%3D%22operator%20token%22%3E%3D%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22token%20function%22%3ERTC_GetFreeRunningCount%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3ERTC%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20thresholdRtcCounts%20%3CSPAN%20class%3D%22operator%20token%22%3E%3D%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22token%20function%22%3ERTC_GetFreeRunningResetThreshold%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3ERTC%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22keyword%20token%22%3Eif%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3EthresholdRtcCounts%20%3CSPAN%20class%3D%22operator%20token%22%3E%26gt%3B%3C%2FSPAN%3E%20currentRtcCounts%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%7B%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20time%20%3CSPAN%20class%3D%22operator%20token%22%3E%3D%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3EthresholdRtcCounts%3CSPAN%20class%3D%22operator%20token%22%3E-%3C%2FSPAN%3EcurrentRtcCounts%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22operator%20token%22%3E*%3C%2FSPAN%3E%3CSPAN%20class%3D%22number%20token%22%3E1000%3C%2FSPAN%3E%3CSPAN%20class%3D%22operator%20token%22%3E%2F%3C%2FSPAN%3E%3CSPAN%20class%3D%22token%20function%22%3ECLOCK_GetFreq%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3EkCLOCK_32KClk%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22punctuation%20token%22%3E%7D%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22keyword%20token%22%3Eelse%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%7B%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20time%20%3CSPAN%20class%3D%22operator%20token%22%3E%3D%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22number%20token%22%3E0x100000000%3C%2FSPAN%3E%3CSPAN%20class%3D%22operator%20token%22%3E-%3C%2FSPAN%3EcurrentRtcCounts%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22operator%20token%22%3E%2B%3C%2FSPAN%3EthresholdRtcCounts%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22operator%20token%22%3E*%3C%2FSPAN%3E%3CSPAN%20class%3D%22number%20token%22%3E1000%3C%2FSPAN%3E%3CSPAN%20class%3D%22operator%20token%22%3E%2F%3C%2FSPAN%3E%3CSPAN%20class%3D%22token%20function%22%3ECLOCK_GetFreq%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3EkCLOCK_32KClk%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22punctuation%20token%22%3E%7D%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22token%20function%22%3EOSA_InterruptEnable%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22keyword%20token%22%3Ereturn%3C%2FSPAN%3E%20time%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22punctuation%20token%22%3E%7D%3C%2FSPAN%3E%0A%0A%3CSPAN%20class%3D%22comment%20token%22%3E%2F*---------------------------------------------------------------------------%0A*%20Name%3A%20PWR_RTCSetWakeupTimeMs%0A*%20Description%3A%20-%0A*%20Parameters%3A%20wakeupTimeMs%3A%20New%20wakeup%20time%20in%20milliseconds%0A*%20Return%3A%20-%0A*---------------------------------------------------------------------------*%2F%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22keyword%20token%22%3Evoid%3C%2FSPAN%3E%20PWR_RTCSetWakeupTimeMs%20%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3Euint32_t%20wakeupTimeMs%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%7B%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20uint32_t%20wakeupTimeTicks%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20uint32_t%20thresholdValue%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20wakeupTimeTicks%20%3CSPAN%20class%3D%22operator%20token%22%3E%3D%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3EwakeupTimeMs%3CSPAN%20class%3D%22operator%20token%22%3E*%3C%2FSPAN%3E%3CSPAN%20class%3D%22token%20function%22%3ECLOCK_GetFreq%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3EkCLOCK_32KClk%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22operator%20token%22%3E%2F%3C%2FSPAN%3E%3CSPAN%20class%3D%22number%20token%22%3E1000%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20thresholdValue%20%3CSPAN%20class%3D%22operator%20token%22%3E%3D%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22token%20function%22%3ERTC_GetFreeRunningCount%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3ERTC%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20thresholdValue%20%3CSPAN%20class%3D%22operator%20token%22%3E%2B%3C%2FSPAN%3E%3CSPAN%20class%3D%22operator%20token%22%3E%3D%3C%2FSPAN%3E%20wakeupTimeTicks%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22token%20function%22%3ERTC_SetFreeRunningInterruptThreshold%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3ERTC%3CSPAN%20class%3D%22punctuation%20token%22%3E%2C%3C%2FSPAN%3E%20thresholdValue%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22punctuation%20token%22%3E%7D%3C%2FSPAN%3E%0A%0A%3CSPAN%20class%3D%22comment%20token%22%3E%2F*---------------------------------------------------------------------------%0A*%20Name%3A%20PWR_RTCWakeupStart%0A*%20Description%3A%20-%0A*%20Parameters%3A%20-%0A*%20Return%3A%20-%0A*---------------------------------------------------------------------------*%2F%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22keyword%20token%22%3Evoid%3C%2FSPAN%3E%20PWR_RTCWakeupStart%20%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22keyword%20token%22%3Evoid%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%7B%3C%2FSPAN%3E%0A%26nbsp%3B%20%3CSPAN%20class%3D%22keyword%20token%22%3Eif%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22operator%20token%22%3E!%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3ERTC%3CSPAN%20class%3D%22operator%20token%22%3E-%26gt%3B%3C%2FSPAN%3ECNT2_CTRL%20%3CSPAN%20class%3D%22operator%20token%22%3E%26amp%3B%3C%2FSPAN%3E%20RTC_CNT2_CTRL_CNT2_EN_MASK%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%7B%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20RTC%3CSPAN%20class%3D%22operator%20token%22%3E-%26gt%3B%3C%2FSPAN%3ECNT2_CTRL%20%3CSPAN%20class%3D%22operator%20token%22%3E%7C%3C%2FSPAN%3E%3CSPAN%20class%3D%22operator%20token%22%3E%3D%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22number%20token%22%3E0x52850000%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22operator%20token%22%3E%7C%3C%2FSPAN%3E%20RTC_CNT2_CTRL_CNT2_EN_MASK%20%3CSPAN%20class%3D%22operator%20token%22%3E%7C%3C%2FSPAN%3E%20RTC_CNT2_CTRL_CNT2_WAKEUP_MASK%20%3CSPAN%20class%3D%22operator%20token%22%3E%7C%3C%2FSPAN%3E%20RTC_CNT2_CTRL_CNT2_INT_EN_MASK%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%26nbsp%3B%20%3CSPAN%20class%3D%22punctuation%20token%22%3E%7D%3C%2FSPAN%3E%0A%26nbsp%3B%20%3CSPAN%20class%3D%22keyword%20token%22%3Eelse%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%7B%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20RTC%3CSPAN%20class%3D%22operator%20token%22%3E-%26gt%3B%3C%2FSPAN%3ECNT2_CTRL%20%3CSPAN%20class%3D%22operator%20token%22%3E%7C%3C%2FSPAN%3E%3CSPAN%20class%3D%22operator%20token%22%3E%3D%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22number%20token%22%3E0x52850000%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22operator%20token%22%3E%7C%3C%2FSPAN%3E%20RTC_CNT2_CTRL_CNT2_WAKEUP_MASK%20%3CSPAN%20class%3D%22operator%20token%22%3E%7C%3C%2FSPAN%3E%20RTC_CNT2_CTRL_CNT2_INT_EN_MASK%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%26nbsp%3B%20%3CSPAN%20class%3D%22punctuation%20token%22%3E%7D%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22punctuation%20token%22%3E%7D%3C%2FSPAN%3E%0A%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%3CSPAN%20class%3D%22line-numbers-rows%22%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%3C%2FP%3E%3CP%3E%26nbsp%3B***%26nbsp%3B%3CSTRONG%3EPWR_Interface.h%20***%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EAdd%20the%20following%20function%20declarations%20at%20the%20end%20of%20the%20file%3C%2FSPAN%3E%3C%2FP%3E%3CPRE%20class%3D%22language-c%20line-numbers%22%3E%3CCODE%3E%3CSPAN%20class%3D%22comment%20token%22%3E%2F*---------------------------------------------------------------------------%0A*%20Name%3A%20PWR_GetTotalSleepDurationMS%0A*%20Description%3A%20-%0A*%20Parameters%3A%20-%0A*%20Return%3A%20-%0A*---------------------------------------------------------------------------*%2F%3C%2FSPAN%3E%0Auint32_t%20%3CSPAN%20class%3D%22token%20function%22%3EPWR_GetTotalSleepDurationMS%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22keyword%20token%22%3Evoid%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%0A%3CSPAN%20class%3D%22comment%20token%22%3E%2F*---------------------------------------------------------------------------%0A*%20Name%3A%20PWR_ResetTotalSleepDuration%0A*%20Description%3A%20-%0A*%20Parameters%3A%20-%0A*%20Return%3A%20-%0A*---------------------------------------------------------------------------*%2F%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22keyword%20token%22%3Evoid%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22token%20function%22%3EPWR_ResetTotalSleepDuration%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22keyword%20token%22%3Evoid%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%0A%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23ifdef%20__cplusplus%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22punctuation%20token%22%3E%7D%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23endif%3C%2FSPAN%3E%0A%0A%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23endif%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22comment%20token%22%3E%2F*%20_PWR_INTERFACE_H_%20*%2F%3C%2FSPAN%3E%0A%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%3CSPAN%20class%3D%22line-numbers-rows%22%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%3C%2FP%3E%3CH1%20id%3D%22toc-hId--1425956461%22%20id%3D%22toc-hId--1425956461%22%20id%3D%22toc-hId--509638249%22%3EFSL_TICKLESS_GENERIC%3C%2FH1%3E%3CP%3EThe%20following%20changes%20have%20the%20purpose%20of%20preparing%20the%20system%20for%20recovering%20the%20missed%20ticks%20during%20the%20low%20power%20period.%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EMake%20the%20following%20changes%20in%20fsl_tickless_generic.h.%20All%20the%20required%20changes%20are%20marked%20as%20comments%20with%20%22Start%22%20where%20the%20change%20starts%2C%20and%20with%20%22End%20where%20the%20change%20ends%22%3C%2FP%3E%3CPRE%20class%3D%22language-c%20line-numbers%22%3E%3CCODE%3E%3CSPAN%20class%3D%22comment%20token%22%3E%2F*%20QN_RTC%3A%20The%20RTC%20free%20running%20is%20a%2032-bit%20counter.%20*%2F%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23define%20portMAX_32_BIT_NUMBER%20(0xffffffffUL)%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23define%20portRTC_CLK_HZ%20(0x8000UL)%3C%2FSPAN%3E%0A%0A%3CSPAN%20class%3D%22comment%20token%22%3E%2F*%20A%20fiddle%20factor%20to%20estimate%20the%20number%20of%20SysTick%20counts%20that%20would%20have%0Aoccurred%20while%20the%20SysTick%20counter%20is%20stopped%20during%20tickless%20idle%0Acalculations.%20*%2F%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23define%20portMISSED_COUNTS_FACTOR%20(45UL)%3C%2FSPAN%3E%0A%0A%3CSPAN%20class%3D%22comment%20token%22%3E%2F*%0A%20*%20The%20number%20of%20SysTick%20increments%20that%20make%20up%20one%20tick%20period.%0A%20*%2F%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22comment%20token%22%3E%2F****************************START**************************%2F%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23if%20configUSE_TICKLESS_IDLE%20%3D%3D%201%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22keyword%20token%22%3Estatic%3C%2FSPAN%3E%20uint32_t%20ulTimerCountsForOneTick%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23endif%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22comment%20token%22%3E%2F*%20configUSE_TICKLESS_IDLE%20*%2F%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22comment%20token%22%3E%2F************************END*********************************%2F%3C%2FSPAN%3E%0A%0A%3CSPAN%20class%3D%22comment%20token%22%3E%2F*%0A%20*%20Setup%20the%20timer%20to%20generate%20the%20tick%20interrupts.%0A%20*%2F%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22keyword%20token%22%3Evoid%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22token%20function%22%3EvPortSetupTimerInterrupt%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22keyword%20token%22%3Evoid%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%0A%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23ifdef%20__cplusplus%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22punctuation%20token%22%3E%7D%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23endif%3C%2FSPAN%3E%0A%0A%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23endif%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22comment%20token%22%3E%2F*%20FSL_TICKLESS_GENERIC_H%20*%2F%3C%2FSPAN%3E%0A%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%3CSPAN%20class%3D%22line-numbers-rows%22%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%3C%2FP%3E%3CH1%20id%3D%22toc-hId-1061556372%22%20id%3D%22toc-hId-1061556372%22%20id%3D%22toc-hId-1977874584%22%3EApplMain.c%3C%2FH1%3E%3CP%3EThis%20is%20the%20main%20application%20file.%20Here%20is%20where%20we%20will%20call%20the%20proper%20APIs%20to%20enter%20the%20MCU%20in%20low%20power%20mode%20and%20perform%20the%20tick%20recovery%20sequence.%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EInclude%20RTC%20and%20FreeRTOS%20header%20files%20needed%3C%2FP%3E%3CPRE%20class%3D%22language-c%20line-numbers%22%3E%3CCODE%3E%3CSPAN%20class%3D%22comment%20token%22%3E%2F*Tickless%3A%20Include%20RTC%20and%20FreeRTOS%20header%20files%20*%2F%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23include%20%3CSPAN%20class%3D%22string%20token%22%3E%22fsl_rtc.h%22%3C%2FSPAN%3E%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23include%20%3CSPAN%20class%3D%22string%20token%22%3E%22fsl_tickless_generic.h%22%3C%2FSPAN%3E%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23include%20%3CSPAN%20class%3D%22string%20token%22%3E%22FreeRTOS.h%22%3C%2FSPAN%3E%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23include%20%3CSPAN%20class%3D%22string%20token%22%3E%22task.h%22%3C%2FSPAN%3E%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%3C%2FSPAN%3E%3CSPAN%20class%3D%22line-numbers-rows%22%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%3C%2FP%3E%3CP%3EQN9080%20includes%20several%20low%20power%20modes.%20Sleep%20mode%20maintains%20most%20of%20the%20modules%20active.%20Power%20Down%20modes%20turn%20off%20most%20of%20the%20modules%20but%20allow%20the%20user%20to%20configure%20some%20modules%20to%20remain%20active%20to%20wake%20the%20MCU%20up%20when%20necessary.%20Using%20tickless%20FreeRTOS%20involves%20having%20to%20wake-up%20by%20some%20timer%20before%20the%20next%20ready%20task%20has%20to%20execute.%20For%20QN908x%20this%20timer%20will%20be%20the%20RTC%20which%20requires%20the%2032.768kHz%20oscillator%20to%20remain%20active.%20We%20will%20change%20the%20Connectivity%20Software%20Power%20Lib%20to%20use%20Deep%20Sleep%20mode%203%20(Power%20Down%20mode%200%20for%20QN908x)%20which%20maintains%20the%2032.768kHz%20oscillator%20on.%20This%20change%20is%20implemented%20in%20the%20%3CSTRONG%3Emain_task%3C%2FSTRONG%3E%20function.%3C%2FP%3E%3CPRE%20class%3D%22language-c%20line-numbers%22%3E%3CCODE%3E%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23if%20!defined(MULTICORE_BLACKBOX)%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22comment%20token%22%3E%2F*%20BLE%20Host%20Stack%20Init%20*%2F%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22keyword%20token%22%3Eif%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22token%20function%22%3EBle_Initialize%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3EApp_GenericCallback%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22operator%20token%22%3E!%3D%3C%2FSPAN%3E%20gBleSuccess_c%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22punctuation%20token%22%3E%7B%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22token%20function%22%3Epanic%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22number%20token%22%3E0%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%2C%3C%2FSPAN%3E%3CSPAN%20class%3D%22number%20token%22%3E0%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%2C%3C%2FSPAN%3E%3CSPAN%20class%3D%22number%20token%22%3E0%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%2C%3C%2FSPAN%3E%3CSPAN%20class%3D%22number%20token%22%3E0%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22keyword%20token%22%3Ereturn%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22punctuation%20token%22%3E%7D%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23endif%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22comment%20token%22%3E%2F*%20MULTICORE_BLACKBOX%20*%2F%3C%2FSPAN%3E%0A%0A%3CSPAN%20class%3D%22comment%20token%22%3E%2F***************%20Start%20****************%2F%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23if%20(cPWR_UsePowerDownMode)%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22token%20function%22%3EPWR_ChangeDeepSleepMode%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22number%20token%22%3E3%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23endif%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22comment%20token%22%3E%2F***************%20End%20****************%2F%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22punctuation%20token%22%3E%7D%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22comment%20token%22%3E%2F*%20Call%20application%20task%20*%2F%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22token%20function%22%3EApp_Thread%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3E%20param%20%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22punctuation%20token%22%3E%7D%3C%2FSPAN%3E%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%3CSPAN%20class%3D%22line-numbers-rows%22%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FCODE%3E%3C%2FPRE%3E%3CBR%20%2F%3E%3CP%3EAlso%2C%20tickless%20FreeRTOS%20requires%20a%20special%20Idle%20function%20which%20takes%20as%20an%20input%20parameter%20the%20amount%20of%20RTOS%20ticks%20the%20MCU%20can%20remain%20asleep%20before%20the%20next%20task%20needs%20to%20be%20executed.%20The%20following%20changes%20disable%20the%20default%20Idle%20function%20provided%20in%20the%20Connectivity%20Software%20demos%20when%20the%20tickless%20mode%20is%20enabled.%3C%2FP%3E%3CPRE%20class%3D%22language-c%20line-numbers%22%3E%3CCODE%3E%3CSPAN%20class%3D%22comment%20token%22%3E%2F************************************************************************************%0A*************************************************************************************%0A*%20Private%20prototypes%0A*************************************************************************************%0A************************************************************************************%2F%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23if%20(cPWR_UsePowerDownMode%20%7C%7C%20gAppUseNvm_d)%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23if%20(mAppIdleHook_c)%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23define%20AppIdle_TaskInit()%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23define%20App_Idle_Task()%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23else%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23if%20(!configUSE_TICKLESS_IDLE)%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22keyword%20token%22%3Estatic%3C%2FSPAN%3E%20osaStatus_t%20%3CSPAN%20class%3D%22token%20function%22%3EAppIdle_TaskInit%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22keyword%20token%22%3Evoid%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22keyword%20token%22%3Estatic%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22keyword%20token%22%3Evoid%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22token%20function%22%3EApp_Idle_Task%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3EosaTaskParam_t%20argument%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23endif%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22comment%20token%22%3E%2F%2F%20configUSE_TICKLESS_IDLE%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23endif%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23endif%3C%2FSPAN%3E%3CSPAN%20class%3D%22line-numbers-rows%22%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FCODE%3E%3C%2FPRE%3E%3CPRE%20class%3D%22language-c%20line-numbers%22%3E%3CCODE%3E%3CSPAN%20class%3D%22comment%20token%22%3E%2F************************************************************************************%0A*************************************************************************************%0A*%20Private%20memory%20declarations%0A*************************************************************************************%0A************************************************************************************%2F%3C%2FSPAN%3E%0A%0A%3CSPAN%20class%3D%22comment%20token%22%3E%2F********************************%20Start%20******************************%2F%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23if%20((cPWR_UsePowerDownMode%20%7C%7C%20gAppUseNvm_d)%20%26amp%3B%26amp%3B%20!configUSE_TICKLESS_IDLE)%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22comment%20token%22%3E%2F********************************%20End%20******************************%2F%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23if%20(!mAppIdleHook_c)%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22token%20function%22%3EOSA_TASK_DEFINE%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3E%20App_Idle_Task%3CSPAN%20class%3D%22punctuation%20token%22%3E%2C%3C%2FSPAN%3E%20gAppIdleTaskPriority_c%3CSPAN%20class%3D%22punctuation%20token%22%3E%2C%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22number%20token%22%3E1%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%2C%3C%2FSPAN%3E%20gAppIdleTaskStackSize_c%3CSPAN%20class%3D%22punctuation%20token%22%3E%2C%3C%2FSPAN%3E%20FALSE%20%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0AosaTaskId_t%20gAppIdleTaskId%20%3CSPAN%20class%3D%22operator%20token%22%3E%3D%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22number%20token%22%3E0%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23endif%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23endif%26nbsp%3B%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22comment%20token%22%3E%2F*%20cPWR_UsePowerDownMode%20*%2F%3C%2FSPAN%3E%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%3CSPAN%20class%3D%22line-numbers-rows%22%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FCODE%3E%3C%2FPRE%3E%3CPRE%20class%3D%22language-c%20line-numbers%22%3E%3CCODE%3E%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23if%20!gUseHciTransportDownward_d%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20pfBLE_SignalFromISR%20%3CSPAN%20class%3D%22operator%20token%22%3E%3D%3C%2FSPAN%3E%20BLE_SignalFromISRCallback%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23endif%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22comment%20token%22%3E%2F*%20!gUseHciTransportDownward_d%20*%2F%3C%2FSPAN%3E%0A%0A%3CSPAN%20class%3D%22comment%20token%22%3E%2F****************************%20Start%20************************%2F%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23if%20((cPWR_UsePowerDownMode%20%7C%7C%20gAppUseNvm_d)%20%26amp%3B%26amp%3B%20!configUSE_TICKLESS_IDLE)%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22comment%20token%22%3E%2F****************************%20End%20************************%2F%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23if%20(!mAppIdleHook_c)%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22token%20function%22%3EAppIdle_TaskInit%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23endif%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23endif%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%3C%2FSPAN%3E%3CSPAN%20class%3D%22line-numbers-rows%22%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FCODE%3E%3C%2FPRE%3E%3CPRE%20class%3D%22language-c%20line-numbers%22%3E%3CCODE%3E%3CSPAN%20class%3D%22comment%20token%22%3E%2F***************************START**************************%2F%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23if%20(cPWR_UsePowerDownMode%20%26amp%3B%26amp%3B%20!configUSE_TICKLESS_IDLE)%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22comment%20token%22%3E%2F******************************END***************************%2F%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22keyword%20token%22%3Estatic%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22keyword%20token%22%3Evoid%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22token%20function%22%3EApp_Idle%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22keyword%20token%22%3Evoid%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22punctuation%20token%22%3E%7B%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20PWRLib_WakeupReason_t%20wakeupReason%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22keyword%20token%22%3Eif%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22token%20function%22%3EPWR_CheckIfDeviceCanGoToSleep%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22punctuation%20token%22%3E%7B%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22comment%20token%22%3E%2F*%20Enter%20Low%20Power%20*%2F%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20wakeupReason%20%3CSPAN%20class%3D%22operator%20token%22%3E%3D%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22token%20function%22%3EPWR_EnterLowPower%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%0A%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23if%20gFSCI_IncludeLpmCommands_c%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22comment%20token%22%3E%2F*%20Send%20Wake%20Up%20indication%20to%20FSCI%20*%2F%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22token%20function%22%3EFSCI_SendWakeUpIndication%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23endif%3C%2FSPAN%3E%0A%0A%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23if%20gKBD_KeysCount_c%20%26gt%3B%200%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22comment%20token%22%3E%2F*%20Woke%20up%20on%20Keyboard%20Press%20*%2F%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22keyword%20token%22%3Eif%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3EwakeupReason%3CSPAN%20class%3D%22punctuation%20token%22%3E.%3C%2FSPAN%3EBits%3CSPAN%20class%3D%22punctuation%20token%22%3E.%3C%2FSPAN%3EFromKeyBoard%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22punctuation%20token%22%3E%7B%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22token%20function%22%3EKBD_SwitchPressedOnWakeUp%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22token%20function%22%3EPWR_DisallowDeviceToSleep%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22punctuation%20token%22%3E%7D%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23endif%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22punctuation%20token%22%3E%7D%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22keyword%20token%22%3Eelse%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22punctuation%20token%22%3E%7B%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22comment%20token%22%3E%2F*%20Enter%20MCU%20Sleep%20*%2F%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22token%20function%22%3EPWR_EnterSleep%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22punctuation%20token%22%3E%7D%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22punctuation%20token%22%3E%7D%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23endif%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22comment%20token%22%3E%2F*%20cPWR_UsePowerDownMode%20*%2F%3C%2FSPAN%3E%0A%0A%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23if%20(mAppIdleHook_c)%3C%2FSPAN%3E%0A%0A%3CSPAN%20class%3D%22keyword%20token%22%3Evoid%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22token%20function%22%3EvApplicationIdleHook%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22keyword%20token%22%3Evoid%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22punctuation%20token%22%3E%7B%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23if%20(gAppUseNvm_d)%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22token%20function%22%3ENvIdle%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23endif%3C%2FSPAN%3E%0A%0A%3CSPAN%20class%3D%22comment%20token%22%3E%2F*******************************START****************************%2F%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23if%20(cPWR_UsePowerDownMode%20%26amp%3B%26amp%3B%20!configUSE_TICKLESS_IDLE)%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22comment%20token%22%3E%2F*********************************END*******************************%2F%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22token%20function%22%3EApp_Idle%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23endif%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22punctuation%20token%22%3E%7D%3C%2FSPAN%3E%0A%0A%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23else%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22comment%20token%22%3E%2F*%20mAppIdleHook_c%20*%2F%3C%2FSPAN%3E%0A%0A%3CSPAN%20class%3D%22comment%20token%22%3E%2F*******************************%20START%20****************************%2F%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23if%20((cPWR_UsePowerDownMode%20%7C%7C%20gAppUseNvm_d)%20%26amp%3B%26amp%3B%20!configUSE_TICKLESS_IDLE)%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22comment%20token%22%3E%2F*******************************%20END%20****************************%2F%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22keyword%20token%22%3Estatic%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22keyword%20token%22%3Evoid%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22token%20function%22%3EApp_Idle_Task%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3EosaTaskParam_t%20argument%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22punctuation%20token%22%3E%7B%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22keyword%20token%22%3Ewhile%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22number%20token%22%3E1%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22punctuation%20token%22%3E%7B%3C%2FSPAN%3E%26nbsp%3B%26nbsp%3B%20%0A%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23if%20gAppUseNvm_d%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22token%20function%22%3ENvIdle%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23endif%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%0A%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23if%20(cPWR_UsePowerDownMode)%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22token%20function%22%3EApp_Idle%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23endif%3C%2FSPAN%3E%0A%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22comment%20token%22%3E%2F*%20For%20BareMetal%20break%20the%20while(1)%20after%201%20run%20*%2F%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22keyword%20token%22%3Eif%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3EgUseRtos_c%20%3CSPAN%20class%3D%22operator%20token%22%3E%3D%3D%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22number%20token%22%3E0%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22punctuation%20token%22%3E%7B%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22keyword%20token%22%3Ebreak%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22punctuation%20token%22%3E%7D%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22punctuation%20token%22%3E%7D%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22punctuation%20token%22%3E%7D%3C%2FSPAN%3E%0A%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%3CSPAN%20class%3D%22line-numbers-rows%22%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EOnce%20the%20default%20Idle%20function%20has%20been%20disabled%2C%20the%20special%20Idle%20function%20must%20be%20implemented.%20Add%20the%20following%20code%20at%20the%20end%20of%20the%20ApplMain.c%20file.%3C%2FP%3E%3CPRE%20class%3D%22language-c%20line-numbers%22%3E%3CCODE%3E%3CSPAN%20class%3D%22comment%20token%22%3E%2F*Tickless%3A%20Implement%20Tickless%20Idle%20*%2F%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23if%20(cPWR_UsePowerDownMode%20%26amp%3B%26amp%3B%20configUSE_TICKLESS_IDLE)%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22keyword%20token%22%3Eextern%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22keyword%20token%22%3Evoid%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22token%20function%22%3EvPortSuppressTicksAndSleep%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3E%20TickType_t%20xExpectedIdleTime%20%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22punctuation%20token%22%3E%7B%3C%2FSPAN%3E%0A%0A%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20uint32_t%20time_ms%20%3CSPAN%20class%3D%22operator%20token%22%3E%3D%3C%2FSPAN%3E%20xExpectedIdleTime%20%3CSPAN%20class%3D%22operator%20token%22%3E*%3C%2FSPAN%3E%20portTICK_PERIOD_MS%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20uint32_t%20tmrMgrExpiryTimeMs%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20ulTimerCountsForOneTick%20%3CSPAN%20class%3D%22operator%20token%22%3E%3D%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22number%20token%22%3E160000%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%3CSPAN%20class%3D%22comment%20token%22%3E%2F%2FVALUE%20OF%20THE%20SYSTICK%2010%20ms%3C%2FSPAN%3E%0A%0A%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23if%20(cPWR_UsePowerDownMode)%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20PWRLib_WakeupReason_t%20wakeupReason%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22comment%20token%22%3E%2F%2FTMR_MGR%3A%20Get%20next%20timer%20manager%20expiry%20time%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20tmrMgrExpiryTimeMs%20%3CSPAN%20class%3D%22operator%20token%22%3E%3D%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22token%20function%22%3ETMR_GetFirstExpireTime%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3EgTmrAllTypes_c%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22comment%20token%22%3E%2F%2F%20TMR_MGR%3A%20Update%20RTC%20Threshold%20only%20if%20RTOS%20needs%20to%20wakeup%20earlier%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22keyword%20token%22%3Eif%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3Etime_ms%3CSPAN%20class%3D%22operator%20token%22%3E%26lt%3B%3C%2FSPAN%3EtmrMgrExpiryTimeMs%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%7B%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22token%20function%22%3EPWR_SetDeepSleepTimeInMs%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3Etime_ms%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22punctuation%20token%22%3E%7D%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22token%20function%22%3EPWR_ResetTotalSleepDuration%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22keyword%20token%22%3Eif%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22token%20function%22%3EPWR_CheckIfDeviceCanGoToSleep%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22punctuation%20token%22%3E%7B%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20wakeupReason%20%3CSPAN%20class%3D%22operator%20token%22%3E%3D%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22token%20function%22%3EPWR_EnterLowPower%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22comment%20token%22%3E%2F%2FFix%3A%20All%20the%20tick%20recovery%20stuff%20should%20only%20happen%20if%20device%20entered%20in%20DSM%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20xExpectedIdleTime%20%3CSPAN%20class%3D%22operator%20token%22%3E%3D%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22token%20function%22%3EPWR_GetTotalSleepDurationMS%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22operator%20token%22%3E%2F%3C%2FSPAN%3E%20portTICK_PERIOD_MS%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22comment%20token%22%3E%2F%2F%20Fix%3A%20ticks%20%3D%20time%20in%20mS%20asleep%20%2F%20mS%20per%20each%20tick%20(portTICK_PERIOD_MS)%3C%2FSPAN%3E%0A%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22comment%20token%22%3E%2F*%20Restart%20SysTick%20so%20it%20runs%20from%20portNVIC_SYSTICK_LOAD_REG%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20again%2C%20then%20set%20portNVIC_SYSTICK_LOAD_REG%20back%20to%20its%20standard%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20value.%20The%20critical%20section%20is%20used%20to%20ensure%20the%20tick%20interrupt%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20can%20only%20execute%20once%20in%20the%20case%20that%20the%20reload%20register%20is%20near%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20zero.%20*%2F%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20portNVIC_SYSTICK_CURRENT_VALUE_REG%20%3CSPAN%20class%3D%22operator%20token%22%3E%3D%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22number%20token%22%3E0UL%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22token%20function%22%3EportENTER_CRITICAL%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20portNVIC_SYSTICK_CTRL_REG%20%3CSPAN%20class%3D%22operator%20token%22%3E%7C%3C%2FSPAN%3E%3CSPAN%20class%3D%22operator%20token%22%3E%3D%3C%2FSPAN%3E%20portNVIC_SYSTICK_ENABLE_BIT%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%20%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22token%20function%22%3EvTaskStepTick%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3E%20xExpectedIdleTime%20%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20portNVIC_SYSTICK_LOAD_REG%20%3CSPAN%20class%3D%22operator%20token%22%3E%3D%3C%2FSPAN%3E%20ulTimerCountsForOneTick%20%3CSPAN%20class%3D%22operator%20token%22%3E-%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22number%20token%22%3E1UL%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%20%0A%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22token%20function%22%3EportEXIT_CRITICAL%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%0A%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23if%20gKBD_KeysCount_c%20%26gt%3B%200%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22comment%20token%22%3E%2F*%20Woke%20up%20on%20Keyboard%20Press%20*%2F%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22keyword%20token%22%3Eif%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3EwakeupReason%3CSPAN%20class%3D%22punctuation%20token%22%3E.%3C%2FSPAN%3EBits%3CSPAN%20class%3D%22punctuation%20token%22%3E.%3C%2FSPAN%3EFromKeyBoard%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22punctuation%20token%22%3E%7B%3C%2FSPAN%3E%20%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22token%20function%22%3EKBD_SwitchPressedOnWakeUp%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22token%20function%22%3EPWR_DisallowDeviceToSleep%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%20%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22punctuation%20token%22%3E%7D%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23endif%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22punctuation%20token%22%3E%7D%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22keyword%20token%22%3Eelse%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22punctuation%20token%22%3E%7B%3C%2FSPAN%3E%20%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22comment%20token%22%3E%2F*%20Enter%20MCU%20Sleep%20*%2F%3C%2FSPAN%3E%20%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22token%20function%22%3EPWR_EnterSleep%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%20%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22punctuation%20token%22%3E%7D%3C%2FSPAN%3E%0A%0A%0A%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23endif%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22comment%20token%22%3E%2F*%20cPWR_UsePowerDownMode%20*%2F%3C%2FSPAN%3E%0A%0A%3CSPAN%20class%3D%22punctuation%20token%22%3E%7D%3C%2FSPAN%3E%0A%0A%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23endif%26nbsp%3B%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22comment%20token%22%3E%2F%2FcPWR_UsePowerDownMode%20%26amp%3B%26amp%3B%20configUSE_TICKLESS_IDLE%3C%2FSPAN%3E%0A%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%3CSPAN%20class%3D%22line-numbers-rows%22%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%3C%2FP%3E%3CP%3EFrom%20the%20previous%20function%2C%20the%20value%20of%26nbsp%3BulTimerCountsForOneTick%20is%20used%20to%20restore%20the%20count%20of%20the%20RTOS%20tick%20timer%20after%20waking%20up.%20This%20value%20depends%20on%20the%20RTOS%20Tick%20interval%20defined%20in%20FreeRTOSConfig.h%20and%20is%20calculated%20using%20the%20following%20formula%3A%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3ESYST_RNR%26nbsp%3B%20%3D%26nbsp%3B%20F_Systick_CLK(Hz)%20*%20T_FreeRTOS_Ticks(ms)%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EWhere%3A%3C%2FP%3E%3CUL%20style%3D%22padding%3A%200px%200px%200px%2030px%3B%22%3E%3CLI%20style%3D%22text-indent%3A%20-.25in%3B%22%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20F_Systick_CLK(Hz)%20%3D%20AHB%20or%2032KHz%20of%20the%20SYST_CSR%20selection%3C%2FLI%3E%3CLI%20style%3D%22text-indent%3A%20-.25in%3B%22%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20T_FreeRTOS_Ticks(ms)%20%3D%20tick%20count%20value.%3C%2FLI%3E%3C%2FUL%3E%3CP%3E%3C%2FP%3E%3CH1%20id%3D%22toc-hId--745898091%22%20id%3D%22toc-hId--745898091%22%20id%3D%22toc-hId-170420121%22%3EFreeRTOSConfig.h%3C%2FH1%3E%3CP%3EFinally%2C%20on%20the%20FreeRTOSConfig.h%20file%2C%20make%20sure%20that%26nbsp%3BconfigUSE_TICKLESS_IDLE%20is%20set%20to%201%3C%2FP%3E%3CPRE%20class%3D%22language-c%20line-numbers%22%3E%3CCODE%3E%20%3CSPAN%20class%3D%22operator%20token%22%3E*%3C%2FSPAN%3E%20See%20http%3CSPAN%20class%3D%22punctuation%20token%22%3E%3A%3C%2FSPAN%3E%3CSPAN%20class%3D%22operator%20token%22%3E%2F%3C%2FSPAN%3E%3CSPAN%20class%3D%22operator%20token%22%3E%2F%3C%2FSPAN%3Ewww%3CSPAN%20class%3D%22punctuation%20token%22%3E.%3C%2FSPAN%3Efreertos%3CSPAN%20class%3D%22punctuation%20token%22%3E.%3C%2FSPAN%3Eorg%3CSPAN%20class%3D%22operator%20token%22%3E%2F%3C%2FSPAN%3Ea00110%3CSPAN%20class%3D%22punctuation%20token%22%3E.%3C%2FSPAN%3Ehtml%3CSPAN%20class%3D%22punctuation%20token%22%3E.%3C%2FSPAN%3E%0A%20%3CSPAN%20class%3D%22operator%20token%22%3E*%3C%2FSPAN%3E%3CSPAN%20class%3D%22operator%20token%22%3E--%3C%2FSPAN%3E%3CSPAN%20class%3D%22operator%20token%22%3E--%3C%2FSPAN%3E%3CSPAN%20class%3D%22operator%20token%22%3E--%3C%2FSPAN%3E%3CSPAN%20class%3D%22operator%20token%22%3E--%3C%2FSPAN%3E%3CSPAN%20class%3D%22operator%20token%22%3E--%3C%2FSPAN%3E%3CSPAN%20class%3D%22operator%20token%22%3E--%3C%2FSPAN%3E%3CSPAN%20class%3D%22operator%20token%22%3E--%3C%2FSPAN%3E%3CSPAN%20class%3D%22operator%20token%22%3E--%3C%2FSPAN%3E%3CSPAN%20class%3D%22operator%20token%22%3E--%3C%2FSPAN%3E%3CSPAN%20class%3D%22operator%20token%22%3E--%3C%2FSPAN%3E%3CSPAN%20class%3D%22operator%20token%22%3E--%3C%2FSPAN%3E%3CSPAN%20class%3D%22operator%20token%22%3E--%3C%2FSPAN%3E%3CSPAN%20class%3D%22operator%20token%22%3E--%3C%2FSPAN%3E%3CSPAN%20class%3D%22operator%20token%22%3E--%3C%2FSPAN%3E%3CSPAN%20class%3D%22operator%20token%22%3E--%3C%2FSPAN%3E%3CSPAN%20class%3D%22operator%20token%22%3E--%3C%2FSPAN%3E%3CSPAN%20class%3D%22operator%20token%22%3E--%3C%2FSPAN%3E%3CSPAN%20class%3D%22operator%20token%22%3E--%3C%2FSPAN%3E%3CSPAN%20class%3D%22operator%20token%22%3E--%3C%2FSPAN%3E%3CSPAN%20class%3D%22operator%20token%22%3E--%3C%2FSPAN%3E%3CSPAN%20class%3D%22operator%20token%22%3E--%3C%2FSPAN%3E%3CSPAN%20class%3D%22operator%20token%22%3E--%3C%2FSPAN%3E%3CSPAN%20class%3D%22operator%20token%22%3E--%3C%2FSPAN%3E%3CSPAN%20class%3D%22operator%20token%22%3E--%3C%2FSPAN%3E%3CSPAN%20class%3D%22operator%20token%22%3E--%3C%2FSPAN%3E%3CSPAN%20class%3D%22operator%20token%22%3E--%3C%2FSPAN%3E%3CSPAN%20class%3D%22operator%20token%22%3E--%3C%2FSPAN%3E%3CSPAN%20class%3D%22operator%20token%22%3E--%3C%2FSPAN%3E%3CSPAN%20class%3D%22operator%20token%22%3E--%3C%2FSPAN%3E%3CSPAN%20class%3D%22operator%20token%22%3E*%3C%2FSPAN%3E%3CSPAN%20class%3D%22operator%20token%22%3E%2F%3C%2FSPAN%3E%0A%0A%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23define%20configUSE_PREEMPTION%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%201%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23define%20configUSE_TICKLESS_IDLE%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%201%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22comment%20token%22%3E%2F%2F%26lt%3B---%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22comment%20token%22%3E%2F*****%20Start%20*****%2F%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23define%20configCPU_CLOCK_HZ%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20(SystemCoreClock)%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23define%20configTICK_RATE_HZ%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20((TickType_t)100)%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23define%20configMAX_PRIORITIES%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20(18)%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23define%20configMINIMAL_STACK_SIZE%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20((unsigned%20short)90)%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%3C%2FSPAN%3E%3CSPAN%20class%3D%22line-numbers-rows%22%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%3C%2FP%3E%3CH1%20id%3D%22toc-hId-1741614742%22%20id%3D%22toc-hId-1741614742%22%20id%3D%22toc-hId--1637034342%22%3ETesting%20Tickless%20RTOS%3C%2FH1%3E%3CP%3EIn%20order%20to%20test%20if%20tickless%20support%20was%20successfully%20added%2C%20an%20example%20application%20that%20toggles%20an%20LED%20is%20implemented.%20This%20application%20configures%20an%20RTOS%20timer%20to%20toggle%20the%20LED%20once%20every%20500mS%20and%20enter%20the%20MCU%20in%20DSM3%20during%20the%20idle%20time.%20The%20Power%20Profiling%20demo%20was%20used%20for%20this%20purpose.%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CH2%20id%3D%22toc-hId--1862791080%22%20id%3D%22toc-hId--1862791080%22%20id%3D%22toc-hId--946472868%22%3E%3C%2FH2%3E%3CH2%20id%3D%22toc-hId-624721753%22%20id%3D%22toc-hId-624721753%22%20id%3D%22toc-hId-1541039965%22%3Epower_profiling.c%3C%2FH2%3E%3CP%3EMake%20sure%20you%20have%20included%20the%20following%20header%20files%3C%2FP%3E%3CPRE%20class%3D%22language-c%20line-numbers%22%3E%3CCODE%3E%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23include%20%3CSPAN%20class%3D%22string%20token%22%3E%22FreeRTOS.h%22%3C%2FSPAN%3E%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22property%20macro%20token%22%3E%23include%20%3CSPAN%20class%3D%22string%20token%22%3E%22task.h%22%3C%2FSPAN%3E%E2%80%8D%E2%80%8D%3C%2FSPAN%3E%3CSPAN%20class%3D%22line-numbers-rows%22%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%3C%2FP%3E%3CP%3ECreate%20an%20RTOS%20task%20for%20blinking%20the%20LED%20every%20500mS.%20First%2C%20declare%20the%20task%20function%2C%20task%20ID%20and%20the%20task%20itself.%3C%2FP%3E%3CPRE%20class%3D%22language-c%20line-numbers%22%3E%3CCODE%3E%3CSPAN%20class%3D%22keyword%20token%22%3Evoid%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22token%20function%22%3EvfnTaskLedBlinkTest%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22keyword%20token%22%3Evoid%3C%2FSPAN%3E%3CSPAN%20class%3D%22operator%20token%22%3E*%3C%2FSPAN%3E%20param%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22comment%20token%22%3E%2F%2FNew%20Task%20Definition%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22token%20function%22%3EOSA_TASK_DEFINE%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3EvfnTaskLedBlinkTest%3CSPAN%20class%3D%22punctuation%20token%22%3E%2C%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22number%20token%22%3E1%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%2C%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22number%20token%22%3E1%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%2C%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22number%20token%22%3E500%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%2C%3C%2FSPAN%3E%20FALSE%20%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0AosaTaskId_t%20gAppTestTask1Id%20%3CSPAN%20class%3D%22operator%20token%22%3E%3D%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22number%20token%22%3E0%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22comment%20token%22%3E%2F%2F%20TestTask1%20Id%E2%80%8D%E2%80%8D%E2%80%8D%3C%2FSPAN%3E%3CSPAN%20class%3D%22line-numbers-rows%22%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%3C%2FP%3E%3CP%3ECreate%20the%20new%20task%20inside%20the%20BleApp_Init%20function%3C%2FP%3E%3CPRE%20class%3D%22language-c%20line-numbers%22%3E%3CCODE%3E%3CSPAN%20class%3D%22keyword%20token%22%3Evoid%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22token%20function%22%3EBleApp_Init%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22keyword%20token%22%3Evoid%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%0A%0A%3CSPAN%20class%3D%22punctuation%20token%22%3E%7B%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22token%20function%22%3EPWR_AllowDeviceToSleep%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20mPowerState%20%3CSPAN%20class%3D%22operator%20token%22%3E%3D%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22number%20token%22%3E0%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22comment%20token%22%3E%2F%2F%20Board%20starts%20with%20PD1%20enabled%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22comment%20token%22%3E%2F*******************%20Start%20*****************%2F%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20gAppTestTask1Id%20%3CSPAN%20class%3D%22operator%20token%22%3E%3D%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22token%20function%22%3EOSA_TaskCreate%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22token%20function%22%3EOSA_TASK%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3EvfnTaskLedBlinkTest%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%2C%3C%2FSPAN%3E%20NULL%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22comment%20token%22%3E%2F%2FTask%20Creation%20%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22comment%20token%22%3E%2F*******************%26nbsp%3B%20End%26nbsp%3B%20*****************%2F%3C%2FSPAN%3E%0A%0A%3CSPAN%20class%3D%22punctuation%20token%22%3E%7D%3C%2FSPAN%3E%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%3CSPAN%20class%3D%22line-numbers-rows%22%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FCODE%3E%3C%2FPRE%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3EFinally%2C%20add%20the%20task%20function%20definition%20at%20the%20end%20of%20the%20file.%3C%2FP%3E%3CPRE%20class%3D%22language-c%20line-numbers%22%3E%3CCODE%3E%3CSPAN%20class%3D%22keyword%20token%22%3Evoid%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22token%20function%22%3EvfnTaskLedBlinkTest%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22keyword%20token%22%3Evoid%3C%2FSPAN%3E%3CSPAN%20class%3D%22operator%20token%22%3E*%3C%2FSPAN%3E%20param%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22punctuation%20token%22%3E%7B%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20uint16_t%20wTimeValue%20%3CSPAN%20class%3D%22operator%20token%22%3E%3D%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22number%20token%22%3E500%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22comment%20token%22%3E%2F%2F500ms%3C%2FSPAN%3E%0A%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22keyword%20token%22%3Ewhile%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22number%20token%22%3E1%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22punctuation%20token%22%3E%7B%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22token%20function%22%3ELED_BLUE_TOGGLE%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22token%20function%22%3EvTaskDelay%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22token%20function%22%3EpdMS_TO_TICKS%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E(%3C%2FSPAN%3EwTimeValue%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22punctuation%20token%22%3E%3B%3C%2FSPAN%3E%0A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20class%3D%22punctuation%20token%22%3E%7D%3C%2FSPAN%3E%20%0A%3CSPAN%20class%3D%22punctuation%20token%22%3E%7D%3C%2FSPAN%3E%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%E2%80%8D%3CSPAN%20class%3D%22line-numbers-rows%22%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3CSPAN%3E%E2%80%8D%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FCODE%3E%3C%2FPRE%3E%3CP%20style%3D%22font-weight%3A%20400%3B%22%3E%3C%2FP%3E%3CP%20style%3D%22font-weight%3A%20400%3B%22%3EWe%20can%26nbsp%3Bmonitor%20the%20power%20consumption%20in%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EMCUXpresso%20IDE%3C%2FSTRONG%3E%2C%20with%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EPower%20Measurement%20Tool.%3C%2FSTRONG%3E%26nbsp%3BWith%20it%2C%20we%20can%20see%20the%20current%20that%20is%20been%20consumed%20and%20prove%20that%20the%20implementation%20is%20working%20as%20the%20expected.%3C%2FP%3E%3CP%20style%3D%22color%3A%20%233d3d3d%3B%22%3E%3C%2FP%3E%3CP%20style%3D%22color%3A%20%233d3d3d%3B%22%3E%3CSPAN%3EConfigure%20the%20Power%20Measurement%20Tool%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22color%3A%20%233d3d3d%3B%22%3E%3CSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22pastedImage_84.png%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22pastedImage_84.png%22%20style%3D%22width%3A%20462px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F65583i3F0B5FCBB26CAE69%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22pastedImage_84.png%22%20alt%3D%22pastedImage_84.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22color%3A%20%233d3d3d%3B%22%3EConsumed%20current%3C%2FP%3E%3CP%20style%3D%22color%3A%20%233d3d3d%3B%22%3E%3CSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22pastedImage_85.png%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22pastedImage_85.png%22%20style%3D%22width%3A%20624px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F65581iE5D69E4EC539EEF8%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22pastedImage_85.png%22%20alt%3D%22pastedImage_85.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1113049%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3EBLE%20Software%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1113054%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20Connectivity%20Software%3A%20Implement%20tickless%20mode%20in%20FreeRTOS%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1113054%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%2351626f%3B%20background-color%3A%20%23ffffff%3B%22%3Epower%20profile%20could%20reach%20reasonable%20power%20consumption%2C%20even%20in%20tickless%20mode%20or%20bareboard%20mode.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%2351626f%3B%20background-color%3A%20%23ffffff%3B%22%3EHowever%2C%20there%20is%20one%20trap%2C%20need%20take%20care.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%2351626f%3B%20background-color%3A%20%23ffffff%3B%22%3EIf%20recovery%20from%20power%20mode%20PD1%2C%20in%20tickless%20idle%20task%2C%20which%20has%20closed%2032K%20OSC%20before%20sleep%2C%26nbsp%3B%20%3CSPAN%20class%3D%22%22%3EPWRLib_LPTMR_Stop%3C%2FSPAN%3E%26nbsp%3B%20will%20crash%20to%20operate%20unpower%20peripherals.%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%2351626f%3B%20background-color%3A%20%23ffffff%3B%22%3Eif%20Power%20mode%20is%20PD0%2C%20the%20issue%20couldn't%20be%20seen%20for%20OSC%20working%20and%20stay%20powered%20during%20sleep.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%2351626f%3B%20background-color%3A%20%23ffffff%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%221.PNG%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%221.PNG%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F92920i204D3DA95A86E20D%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%221.PNG%22%20alt%3D%221.PNG%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%2351626f%3B%20background-color%3A%20%23ffffff%3B%22%3EHow%20to%20fix%3A%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%2351626f%3B%20background-color%3A%20%23ffffff%3B%22%3EJudge%20recovery%20from%20PD1%20or%20PD0.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%2351626f%3B%20background-color%3A%20%23ffffff%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Capture.PNG%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Capture.PNG%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F92949i46D8DB2FAF571623%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Capture.PNG%22%20alt%3D%22Capture.PNG%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1113053%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20Connectivity%20Software%3A%20Implement%20tickless%20mode%20in%20FreeRTOS%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1113053%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3ETemperature%20sensor%20example%20appears%20to%20work%20in%20tickless%20mode..%3C%2FP%3E%3CP%3ESlightly%20higher%20sleep%20consumption%20versus%20the%20power%20profile%20example%20though%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1113052%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20Connectivity%20Software%3A%20Implement%20tickless%20mode%20in%20FreeRTOS%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1113052%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EWhich%20example%20is%20it%20best%20to%20use%20to%20test%20tickless%20freertos%20and%20low%20power%20operation%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1113051%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20Connectivity%20Software%3A%20Implement%20tickless%20mode%20in%20FreeRTOS%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1113051%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%3A%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3ELatest%20SDK%20v2.2%20has%20support%20tickless%20of%20freertos%2C%20need%20enable%26nbsp%3B%26nbsp%3Bbelow%20macro%20in%26nbsp%3B%20%3CSPAN%20class%3D%22%22%3Eapp_preinclude.h%3C%2FSPAN%3E%20%3CBR%20%2F%3E%20%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22%22%3EconfigUSE_TICKLESS_IDLE%3C%2FSPAN%3E%3CSPAN%20class%3D%22%22%3E%EF%BC%9A%E4%B8%BA%3C%2FSPAN%3E%3CSPAN%20class%3D%22%22%3E1%3CBR%20%2F%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22%22%3E%E4%BB%A5%E4%B8%8B%E5%AE%9A%E4%B9%89%E7%94%A8%E4%BA%8E%E8%AE%A1%E7%AE%97%3C%2FSPAN%3E%3CSPAN%20class%3D%22%22%3Etickless%3C%2FSPAN%3E%3CSPAN%20class%3D%22%22%3E%E6%B6%88%E9%80%9D%E6%97%B6%E9%97%B4%3CBR%20%2F%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22%22%3E%2F*%20RTC%20is%20not%20operating%20in%20PD1%2C%20so%20disable%20RTC%20related%20code%20in%20PWR%20module%20*%2F%3CBR%20%2F%3E%23define%20cPWR_EnableLpTmrRunning%201%3CBR%20%2F%3E%23define%20cPWR_EnablePD0RtcInterrupt%201%3C%2FSPAN%3E%20%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1113050%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20Connectivity%20Software%3A%20Implement%20tickless%20mode%20in%20FreeRTOS%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1113050%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3ECan%20this%20guide%20be%20updated%20for%20the%20latest%20SDK%2C%20there%20appears%20to%20be%20partial%20support%20for%20tickless%20mode%20implemented%20in%20the%20SDK%20for%20QN9080%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E
No ratings
Version history
Last update:
‎09-10-2020 02:20 AM
Updated by: