<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: freeRTOS tickless feature on K27 in Kinetis Software Development Kit</title>
    <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/freeRTOS-tickless-feature-on-K27/m-p/618831#M6451</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Maneesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have you implemented the&amp;nbsp;configPRE_SLEEP_PROCESSING function?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is an example:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;void K66F_EnterStopMode(uint32_t* xModifiableIdleTime)&lt;BR /&gt;{&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;*xModifiableIdleTime = 0;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;SMC_SetPowerModeVlps(SMC);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;This would put the system into VLPS mode, you just need to make sure you have a wakeup method enabled before you put it to sleep.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Evgeny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 13 Jul 2017 17:39:20 GMT</pubDate>
    <dc:creator>evgenyerlihman</dc:creator>
    <dc:date>2017-07-13T17:39:20Z</dc:date>
    <item>
      <title>freeRTOS tickless feature on K27</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/freeRTOS-tickless-feature-on-K27/m-p/618828#M6448</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;Hi Sir,&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;I am using -&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;STRONG style="border: 0px; font-weight: bold;"&gt;FreeRTOS V8.2.3,&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;STRONG style="border: 0px; font-weight: bold;"&gt;Kinetis Design Studio Version: 3.2.0, and&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;STRONG style="border: 0px; font-weight: bold;"&gt;KL27 Processor&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;STRONG style="border: 0px; font-weight: bold;"&gt;( Note : - I am not using processor Expert in feature in my project )&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;in my application, and I am now trying to lower the power consumption by implementing tickless mode feature.&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;But, I am facing some issues regarding the implementation of tickless mode feature.&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;I did the same steps as mentioned on FreeRTOS &amp;nbsp;-&amp;nbsp;&lt;A data-content-finding="Community" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.freertos.org%2Flow-power-tickless-rtos.html" rel="nofollow" style="color: #5e89c1; border: 0px; font-weight: inherit; text-decoration: none; padding: 0px calc(12px + 0.35ex) 0px 0px;" target="_blank"&gt;Tickless Low power features in FreeRTOS&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit; text-decoration: underline;"&gt;&lt;STRONG style="border: 0px; font-weight: bold;"&gt;STEP 1 :-&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #202020; border: 0px; font-weight: inherit; font-size: 14px;"&gt;&amp;nbsp; Built in tickless idle functionality is enabled by defining configUSE_TICKLESS_IDLE as 1 in FreeRTOSConfig.h&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;/* For Tickless Mode */&lt;BR /&gt;#define xIdleTime 1000&lt;BR /&gt;#define configUSE_TICKLESS_IDLE 1 //added for tickless mode&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;/* First define the portSUPPRESS_TICKS_AND_SLEEP() macro. The parameter is the&lt;BR /&gt;time, in ticks, until the kernel next needs to execute. */&lt;BR /&gt;#define portSUPPRESS_TICKS_AND_SLEEP( xIdleTime ) vPortSuppressTicksAndSleep( xIdleTime )&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="color: #202020; border: 0px; font-weight: inherit; font-size: 14px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit; text-decoration: underline; font-size: 14px;"&gt;&lt;STRONG style="border: 0px; font-weight: bold; font-size: 14px;"&gt;STEP 2:-&lt;/STRONG&gt; &lt;/SPAN&gt;Using the Default I&lt;SPAN style="background-color: #ffffff; border: 0px; font-weight: inherit; font-size: 14px;"&gt;mplementation of &lt;SPAN style="border: 0px; font-weight: inherit; font-size: 14px;"&gt;vPortSuppressTicksAndSleep( &amp;nbsp;) fn defined in port.c&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;#if configUSE_TICKLESS_IDLE == 1&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;BR /&gt;__attribute__(( weak )) void vPortSuppressTicksAndSleep( TickType_t xExpectedIdleTime )&lt;BR /&gt;{&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;uint32_t ulReloadValue, ulCompleteTickPeriods, ulCompletedSysTickDecrements, ulSysTickCTRL;&lt;BR /&gt;TickType_t xModifiableIdleTime;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;/* Make sure the SysTick reload value does not overflow the counter. */&lt;BR /&gt;if( xExpectedIdleTime &amp;gt; xMaximumPossibleSuppressedTicks )&lt;BR /&gt;{&lt;BR /&gt;xExpectedIdleTime = xMaximumPossibleSuppressedTicks;&lt;BR /&gt;}&lt;BR /&gt;if (xExpectedIdleTime == 0) return;&lt;BR /&gt;/* Stop the SysTick momentarily. The time the SysTick is stopped for&lt;BR /&gt;is accounted for as best it can be, but using the tickless mode will&lt;BR /&gt;inevitably result in some tiny drift of the time maintained by the&lt;BR /&gt;kernel with respect to calendar time. */&lt;BR /&gt;*(portNVIC_SYSTICK_CTRL) &amp;amp;= ~portNVIC_SYSTICK_ENABLE_BIT;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;/* Calculate the reload value required to wait xExpectedIdleTime&lt;BR /&gt;tick periods. -1 is used because this code will execute part way&lt;BR /&gt;through one of the tick periods. */&lt;BR /&gt;ulReloadValue = portNVIC_SYSTICK_CURRENT_VALUE_REG + ( ulTimerCountsForOneTick * ( xExpectedIdleTime - 1UL ) );&lt;BR /&gt;if( ulReloadValue &amp;gt; ulStoppedTimerCompensation )&lt;BR /&gt;{&lt;BR /&gt;ulReloadValue -= ulStoppedTimerCompensation;&lt;BR /&gt;}&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;/* Enter a critical section but don't use the taskENTER_CRITICAL()&lt;BR /&gt;method as that will mask interrupts that should exit sleep mode. */&lt;BR /&gt;__asm volatile( "cpsid i" );&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;/* If a context switch is pending or a task is waiting for the scheduler&lt;BR /&gt;to be unsuspended then abandon the low power entry. */&lt;BR /&gt;if( eTaskConfirmSleepModeStatus() == eAbortSleep )&lt;BR /&gt;{&lt;BR /&gt;/* Restart from whatever is left in the count register to complete&lt;BR /&gt;this tick period. */&lt;BR /&gt;*(portNVIC_SYSTICK_LOAD) = portNVIC_SYSTICK_CURRENT_VALUE_REG;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;/* Restart SysTick. */&lt;BR /&gt;*(portNVIC_SYSTICK_CTRL) |= portNVIC_SYSTICK_ENABLE_BIT;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;/* Reset the reload register to the value required for normal tick&lt;BR /&gt;periods. */&lt;BR /&gt;*(portNVIC_SYSTICK_LOAD) = ulTimerCountsForOneTick - 1UL;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;/* Re-enable interrupts - see comments above the cpsid instruction()&lt;BR /&gt;above. */&lt;BR /&gt;__asm volatile( "cpsie i" );&lt;BR /&gt;}&lt;BR /&gt;else&lt;BR /&gt;{&lt;BR /&gt;/* Set the new reload value. */&lt;BR /&gt;*(portNVIC_SYSTICK_LOAD) = ulReloadValue;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;/* Clear the SysTick count flag and set the count value back to&lt;BR /&gt;zero. */&lt;BR /&gt;portNVIC_SYSTICK_CURRENT_VALUE_REG = 0UL;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;/* Restart SysTick. */&lt;BR /&gt;*(portNVIC_SYSTICK_CTRL) |= portNVIC_SYSTICK_ENABLE_BIT;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;/* Sleep until something happens. configPRE_SLEEP_PROCESSING() can&lt;BR /&gt;set its parameter to 0 to indicate that its implementation contains&lt;BR /&gt;its own wait for interrupt or wait for event instruction, and so wfi&lt;BR /&gt;should not be executed again. However, the original expected idle&lt;BR /&gt;time variable must remain unmodified, so a copy is taken. */&lt;BR /&gt;xModifiableIdleTime = xExpectedIdleTime;&lt;BR /&gt;configPRE_SLEEP_PROCESSING( xModifiableIdleTime );&lt;BR /&gt;if( xModifiableIdleTime &amp;gt; 0 )&lt;BR /&gt;{&lt;BR /&gt;__asm volatile( "dsb" );&lt;BR /&gt;__asm volatile( "wfi" );&lt;BR /&gt;__asm volatile( "isb" );&lt;BR /&gt;}&lt;BR /&gt;configPOST_SLEEP_PROCESSING( xExpectedIdleTime );&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;/* Stop SysTick. Again, the time the SysTick is stopped for is&lt;BR /&gt;accounted for as best it can be, but using the tickless mode will&lt;BR /&gt;inevitably result in some tiny drift of the time maintained by the&lt;BR /&gt;kernel with respect to calendar time. */&lt;BR /&gt;ulSysTickCTRL = *(portNVIC_SYSTICK_CTRL);&lt;BR /&gt;*(portNVIC_SYSTICK_CTRL) = ( ulSysTickCTRL &amp;amp; ~portNVIC_SYSTICK_ENABLE_BIT );&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;/* Re-enable interrupts - see comments above the cpsid instruction()&lt;BR /&gt;above. */&lt;BR /&gt;__asm volatile( "cpsie i" );&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;if( ( ulSysTickCTRL &amp;amp; portNVIC_SYSTICK_COUNT_FLAG_BIT ) != 0 )&lt;BR /&gt;{&lt;BR /&gt;uint32_t ulCalculatedLoadValue;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;/* The tick interrupt has already executed, and the SysTick&lt;BR /&gt;count reloaded with ulReloadValue. Reset the&lt;BR /&gt;portNVIC_SYSTICK_LOAD_REG with whatever remains of this tick&lt;BR /&gt;period. */&lt;BR /&gt;ulCalculatedLoadValue = ( ulTimerCountsForOneTick - 1UL ) - ( ulReloadValue - portNVIC_SYSTICK_CURRENT_VALUE_REG );&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;/* Don't allow a tiny value, or values that have somehow&lt;BR /&gt;underflowed because the post sleep hook did something&lt;BR /&gt;that took too long. */&lt;BR /&gt;if( ( ulCalculatedLoadValue &amp;lt; ulStoppedTimerCompensation ) || ( ulCalculatedLoadValue &amp;gt; ulTimerCountsForOneTick ) )&lt;BR /&gt;{&lt;BR /&gt;ulCalculatedLoadValue = ( ulTimerCountsForOneTick - 1UL );&lt;BR /&gt;}&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;*(portNVIC_SYSTICK_LOAD) = ulCalculatedLoadValue;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;/* The tick interrupt handler will already have pended the tick&lt;BR /&gt;processing in the kernel. As the pending tick will be&lt;BR /&gt;processed as soon as this function exits, the tick value&lt;BR /&gt;maintained by the tick is stepped forward by one less than the&lt;BR /&gt;time spent waiting. */&lt;BR /&gt;ulCompleteTickPeriods = xExpectedIdleTime - 1UL;&lt;BR /&gt;}&lt;BR /&gt;else&lt;BR /&gt;{&lt;BR /&gt;/* Something other than the tick interrupt ended the sleep.&lt;BR /&gt;Work out how long the sleep lasted rounded to complete tick&lt;BR /&gt;periods (not the ulReload value which accounted for part&lt;BR /&gt;ticks). */&lt;BR /&gt;ulCompletedSysTickDecrements = ( xExpectedIdleTime * ulTimerCountsForOneTick ) - portNVIC_SYSTICK_CURRENT_VALUE_REG;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;/* How many complete tick periods passed while the processor&lt;BR /&gt;was waiting? */&lt;BR /&gt;ulCompleteTickPeriods = ulCompletedSysTickDecrements / ulTimerCountsForOneTick;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;/* The reload value is set to whatever fraction of a single tick&lt;BR /&gt;period remains. */&lt;BR /&gt;*(portNVIC_SYSTICK_LOAD) = ( ( ulCompleteTickPeriods + 1 ) * ulTimerCountsForOneTick ) - ulCompletedSysTickDecrements;&lt;BR /&gt;}&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;/* Restart SysTick so it runs from portNVIC_SYSTICK_LOAD_REG&lt;BR /&gt;again, then set portNVIC_SYSTICK_LOAD_REG back to its standard&lt;BR /&gt;value. The critical section is used to ensure the tick interrupt&lt;BR /&gt;can only execute once in the case that the reload register is near&lt;BR /&gt;zero. */&lt;BR /&gt;portNVIC_SYSTICK_CURRENT_VALUE_REG = 0UL;&lt;BR /&gt;portENTER_CRITICAL();&lt;BR /&gt;{&lt;BR /&gt;*(portNVIC_SYSTICK_CTRL) |= portNVIC_SYSTICK_ENABLE_BIT;&lt;BR /&gt;vTaskStepTick( ulCompleteTickPeriods );&lt;BR /&gt;*(portNVIC_SYSTICK_LOAD) = ulTimerCountsForOneTick - 1UL;&lt;BR /&gt;}&lt;BR /&gt;portEXIT_CRITICAL();&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;}&lt;BR /&gt;}&lt;BR /&gt;#endif /* #if configUSE_TICKLESS_IDLE */&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;#endif&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit; text-decoration: underline;"&gt;&lt;STRONG style="border: 0px; font-weight: bold;"&gt;My Observation :-&lt;/STRONG&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;1) Now when i suspended all my task then Idle Task is getting priority to run is internally&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;calling&amp;nbsp;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;vPortSuppressTicksAndSleep(). and system is able to go into tickless mode. but tick timer timeout is&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;&amp;nbsp; &amp;nbsp; happening very fast and the system is entering and exiting the sleep mode very frequently.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;2) i even try to disable the tickless timer by removing reload value and by not restarting the sys-tick timer in&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="background-color: #ffffff; border: 0px; font-weight: inherit;"&gt;&amp;nbsp; &amp;nbsp;vPortSuppressTicksAndSleep() fn.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;so i noticed that system enter's into sleep mode but since no timer, no timeout&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp; &amp;nbsp;so it remains in that state......&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;&amp;nbsp; &amp;nbsp; and i need to restart the system to wake up from the sleep.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit; text-decoration: underline;"&gt;&lt;STRONG style="border: 0px; font-weight: bold; text-decoration: underline;"&gt;My Problem :-&amp;nbsp;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;1) The current saving provided from above mentioned method is very minimal and it doesn't serve my purpose of keeping&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;&amp;nbsp; &amp;nbsp; CPU in deep Sleep Mode.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;2)&amp;nbsp;&lt;/SPAN&gt;&lt;EM style="border: 0px; font-weight: inherit;"&gt;So It looks like the framework for tickless mode that is provided by FreeRTOS is focused on eliminating the handling of “idle” ticks by the operating system. So it saves some code execution cycles. But it does not seem to address the deeper issues, like shutting down clock/power domains for sleeping peripherals.&lt;BR /&gt;&lt;BR /&gt;Also, even in tickless mode there is a counter running and some sort of comparison logic that knows to generate an interrupt after the ExpectedIdleTime is reached so that a scheduled task can run.&lt;BR /&gt;&lt;BR /&gt;So the current we measure in “sleep” may represent a fair amount of non-sleeping hardware functionality inside the chip.&lt;/EM&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;STRONG style="border: 0px; font-weight: bold; text-decoration: underline;"&gt;My Requirement :-&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;I want to keep my&amp;nbsp;system into very low power state i.e very deep sleep mode and it should be in that state until any external interrupt occurred... or after every 30 min only.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;Now please help me to solve this issue.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;STRONG style="border: 0px; font-weight: bold;"&gt;1) How can put KL27 into deep sleep mode ?&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;STRONG style="border: 0px; font-weight: bold;"&gt;2) I am using FreeRTOS V8.2.3 &amp;nbsp;and i tried tickless mode feature as mention by FreeRTOS, but it is not serving my&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;STRONG style="border: 0px; font-weight: bold;"&gt;&amp;nbsp; &amp;nbsp; purpose so what else i need to &amp;nbsp;do in FreeRTOS to avoid very fast sleep enter and exit and how can i keep the&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;STRONG style="border: 0px; font-weight: bold;"&gt;&amp;nbsp; &amp;nbsp; system in sleep mode for longer time.&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;It would be great if someone could have a look at this and help me to solve this issue.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;Any help will be Appreciated.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;Thanks &amp;amp; Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;Maneesh&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Apr 2017 12:52:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/freeRTOS-tickless-feature-on-K27/m-p/618828#M6448</guid>
      <dc:creator>maneeshsingh</dc:creator>
      <dc:date>2017-04-18T12:52:48Z</dc:date>
    </item>
    <item>
      <title>Re: freeRTOS tickless feature on K27</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/freeRTOS-tickless-feature-on-K27/m-p/618829#M6449</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Anyone Any Reply Over my previous post ? &amp;nbsp;&lt;/P&gt;&lt;H1 style="color: #646464; background-color: #ffffff; border: 0px; font-weight: 200; font-size: 2rem;"&gt;freeRTOS tickless feature on K27&lt;/H1&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Apr 2017 12:53:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/freeRTOS-tickless-feature-on-K27/m-p/618829#M6449</guid>
      <dc:creator>maneeshsingh</dc:creator>
      <dc:date>2017-04-19T12:53:14Z</dc:date>
    </item>
    <item>
      <title>Re: freeRTOS tickless feature on K27</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/freeRTOS-tickless-feature-on-K27/m-p/618830#M6450</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Maneesh:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For putting KL27 into deep sleep mode, please refer to the power manager demo.&lt;/P&gt;&lt;P&gt;SDK_[2.2]_FRDM-KL27Z\boards\frdmkl27z\demo_apps\power_manager.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We have a Have you tried the tickless demo, does this demo serve your purpose?&lt;/P&gt;&lt;P&gt;SDK_[2.2]_FRDM-KL27Z\boards\frdmkl27z\rtos_examples\freertos_tickless&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Apr 2017 06:06:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/freeRTOS-tickless-feature-on-K27/m-p/618830#M6450</guid>
      <dc:creator>danielchen</dc:creator>
      <dc:date>2017-04-28T06:06:44Z</dc:date>
    </item>
    <item>
      <title>Re: freeRTOS tickless feature on K27</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/freeRTOS-tickless-feature-on-K27/m-p/618831#M6451</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Maneesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have you implemented the&amp;nbsp;configPRE_SLEEP_PROCESSING function?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is an example:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;void K66F_EnterStopMode(uint32_t* xModifiableIdleTime)&lt;BR /&gt;{&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;*xModifiableIdleTime = 0;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;SMC_SetPowerModeVlps(SMC);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;This would put the system into VLPS mode, you just need to make sure you have a wakeup method enabled before you put it to sleep.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Evgeny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Jul 2017 17:39:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/freeRTOS-tickless-feature-on-K27/m-p/618831#M6451</guid>
      <dc:creator>evgenyerlihman</dc:creator>
      <dc:date>2017-07-13T17:39:20Z</dc:date>
    </item>
  </channel>
</rss>

