<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.element14.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Low Power LLS Mode on Freescale's Kinetis FRDM-KL25Z board</title><link>https://community.element14.com/products/devtools/kinetiskl2freedomboard/w/documents/16897/low-power-lls-mode-on-freescale-s-kinetis-frdm-kl25z-board</link><description /><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>Low Power LLS Mode on Freescale's Kinetis FRDM-KL25Z board</title><link>https://community.element14.com/products/devtools/kinetiskl2freedomboard/w/documents/16897/low-power-lls-mode-on-freescale-s-kinetis-frdm-kl25z-board</link><pubDate>Fri, 08 Oct 2021 07:50:05 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:fe3961a7-326d-4e78-a8b9-2fcf9e963783</guid><dc:creator>bheemarao</dc:creator><comments>https://community.element14.com/products/devtools/kinetiskl2freedomboard/w/documents/16897/low-power-lls-mode-on-freescale-s-kinetis-frdm-kl25z-board#comments</comments><description>Current Revision posted to Documents by bheemarao on 10/8/2021 7:50:05 AM&lt;br /&gt;
&lt;p style="margin:0;"&gt;&lt;span style="color:#ff6600;font-size:10pt;font-family:inherit;font-weight:inherit;"&gt;&lt;em&gt;This tutorial was extracted from Erich Styger blog &lt;/em&gt;&lt;/span&gt;&lt;span style="font-size:10pt;color:#373737;"&gt;&lt;a class="jive-link-external-small" href="http://mcuoneclipse.wordpress.com/" rel="nofollow" style="font-weight:inherit;font-style:inherit;font-family:inherit;color:#592d5f;" target="_blank"&gt;&lt;span style="font-style:inherit;font-family:inherit;font-weight:inherit;"&gt;&lt;em&gt;http://mcuoneclipse.wordpress.com&lt;/em&gt;&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span style="color:#ff6600;font-size:10pt;font-family:inherit;font-weight:inherit;"&gt;&lt;em&gt; with his agreement.&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;span style="color:#ff6600;font-size:10pt;font-family:inherit;font-weight:inherit;"&gt;&lt;em&gt;&lt;br /&gt;&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;span style="color:#ff6600;font-size:10pt;font-family:inherit;font-weight:inherit;"&gt;&lt;em&gt;&lt;span style="color:#373737;font-family:&amp;#39;Helvetica Neue&amp;#39;, Helvetica, Arial, sans-serif;font-size:15px;font-style:normal;font-weight:300;text-align:start;text-indent:0px;"&gt;In “&lt;/span&gt;&lt;a class="jive-link-external-small" href="http://mcuoneclipse.com/2014/02/09/iot-freertos-down-to-the-micro-amps/" rel="nofollow ugc noopener" style="font-family:&amp;#39;Helvetica Neue&amp;#39;, Helvetica, Arial, sans-serif;font-size:15px;font-style:normal;font-weight:300;color:#1982d1;text-align:start;text-indent:0px;" target="_blank" title="IoT: FreeRTOS Down to the Micro Amps"&gt;IoT: FreeRTOS Down to the Micro Amps&lt;/a&gt;&lt;span style="color:#373737;font-family:&amp;#39;Helvetica Neue&amp;#39;, Helvetica, Arial, sans-serif;font-size:15px;font-style:normal;font-weight:300;text-align:start;text-indent:0px;"&gt;” I’m using an application with FreeRTOS to get down in micro amps low power mode. Well, nearly all or my applications are using FreeRTOS because it makes the application scalable and extensible. Still, for anyone not used to an RTOS, that might be a hard start. So here we go: how to get into the Kinetis Low Power LLS Mode *without* an RTOS.&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;span style="color:#ff6600;font-size:10pt;font-family:inherit;font-weight:inherit;"&gt;&lt;em style="text-indent:0px;text-align:start;color:#373737;font-style:normal;font-size:15px;font-family:&amp;#39;Helvetica Neue&amp;#39;, Helvetica, Arial, sans-serif;font-weight:300;"&gt;&lt;br /&gt;&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;span style="color:#ff6600;font-size:10pt;font-family:inherit;font-weight:inherit;"&gt;&lt;em style="text-indent:0px;text-align:start;color:#373737;font-style:normal;font-size:15px;font-family:&amp;#39;Helvetica Neue&amp;#39;, Helvetica, Arial, sans-serif;font-weight:300;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;a href="http://mcuoneclipse.files.wordpress.com/2014/03/power-measurement.png?w=584&amp;amp;h=507"&gt;&lt;img alt="Power Measurement" class="jiveImage" src="http://mcuoneclipse.files.wordpress.com/2014/03/power-measurement.png?w=584&amp;amp;h=507" /&gt;&lt;/a&gt;&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;span style="color:#ff6600;font-size:10pt;font-family:inherit;font-weight:inherit;"&gt;&lt;em style="text-indent:0px;text-align:start;color:#373737;font-style:normal;font-size:15px;font-family:&amp;#39;Helvetica Neue&amp;#39;, Helvetica, Arial, sans-serif;font-weight:300;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:#666666;font-family:Georgia, serif;font-size:12px;font-style:normal;font-weight:300;text-align:start;text-indent:0px;background-color:#eeeeee;"&gt;Power Measurement&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;span style="color:#ff6600;font-size:10pt;font-family:inherit;font-weight:inherit;"&gt;&lt;em style="text-indent:0px;color:#666666;text-align:start;font-size:12px;font-style:normal;background-color:#eeeeee;font-family:Georgia, serif;font-weight:300;"&gt;&lt;br /&gt;&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;&lt;h1 style="font-family:&amp;#39;Helvetica Neue&amp;#39;, Helvetica, Arial, sans-serif;font-size:15px;font-style:normal;font-weight:bold;margin:0 0 0.8125em;color:#000000;text-align:start;text-indent:0px;"&gt;Outline&lt;/h1&gt;&lt;p style="margin:0;font-family:&amp;#39;Helvetica Neue&amp;#39;,Helvetica,Arial,sans-serif;font-size:15px;font-style:normal;font-weight:300;margin:0px 0px 1.625em;color:#373737;text-align:start;text-indent:0px;"&gt;In this project I create a very simple bare-metal application for the Freescale FRDM-KL25Z board. All what it does is to blink an LED from the Low Power wake-up interrupt to show that the application is running. Right after the wake-up interrupt, it enters again the LLS low power mode. So I enter LLS low power mode, and the timer interrupt will wake me up every second. As in LLS mode only a few timer and wake-up sources are available, I’m going to use the 1 kHz Low Power clock source.&lt;/p&gt;&lt;p style="margin:0;font-family:&amp;#39;Helvetica Neue&amp;#39;,Helvetica,Arial,sans-serif;font-size:15px;font-style:normal;font-weight:300;margin:0px 0px 1.625em;color:#373737;text-align:start;text-indent:0px;"&gt;The project and all the settings is available on GitHub at the link provided at the end of this article.&lt;/p&gt;&lt;h1 style="font-family:&amp;#39;Helvetica Neue&amp;#39;, Helvetica, Arial, sans-serif;font-size:15px;font-style:normal;font-weight:bold;margin:0 0 0.8125em;color:#000000;text-align:start;text-indent:0px;"&gt;Processor Expert Components&lt;/h1&gt;&lt;p style="margin:0;font-family:&amp;#39;Helvetica Neue&amp;#39;,Helvetica,Arial,sans-serif;font-size:15px;font-style:normal;font-weight:300;margin:0px 0px 1.625em;color:#373737;text-align:start;text-indent:0px;"&gt;In this project, I’m using the following components:&lt;/p&gt;&lt;ol style="font-family:&amp;#39;Helvetica Neue&amp;#39;, Helvetica, Arial, sans-serif;font-size:15px;font-style:normal;font-weight:300;margin:0 0 1.625em 2.5em;list-style:decimal;color:#373737;text-align:start;text-indent:0px;"&gt;&lt;li&gt;3&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;strong style="font-family:inherit;font-size:15px;font-style:inherit;"&gt;LED&lt;/strong&gt;&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;components (RGB)&lt;/li&gt;&lt;li&gt;&lt;strong style="font-family:inherit;font-size:15px;font-style:inherit;"&gt;TimerInt&lt;/strong&gt;&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;with&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;strong style="font-family:inherit;font-size:15px;font-style:inherit;"&gt;TimerUnit_LDD&lt;/strong&gt;&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;for the low power wake-up timer&lt;/li&gt;&lt;li&gt;&lt;strong style="font-family:inherit;font-size:15px;font-style:inherit;"&gt;WAIT&lt;/strong&gt;&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;component to flash different LED’s after power-up with a delay.&lt;/li&gt;&lt;/ol&gt;&lt;p style="margin:0;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;a href="http://mcuoneclipse.files.wordpress.com/2014/03/processor-expert-components.png?w=584"&gt;&lt;img loading="lazy" alt="Processor Expert Components" class="jiveImage" src="http://mcuoneclipse.files.wordpress.com/2014/03/processor-expert-components.png?w=584" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p style="margin:0;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:#666666;font-family:Georgia, serif;font-size:12px;font-style:normal;font-weight:300;text-align:start;text-indent:0px;background-color:#eeeeee;"&gt;Processor Expert Components&lt;/span&gt;&lt;/p&gt;&lt;h1 style="font-family:&amp;#39;Helvetica Neue&amp;#39;, Helvetica, Arial, sans-serif;font-size:15px;font-style:normal;font-weight:bold;margin:0 0 0.8125em;color:#000000;text-align:start;text-indent:0px;"&gt;Timer&lt;/h1&gt;&lt;p style="margin:0;font-family:&amp;#39;Helvetica Neue&amp;#39;,Helvetica,Arial,sans-serif;font-size:15px;font-style:normal;font-weight:300;margin:0px 0px 1.625em;color:#373737;text-align:start;text-indent:0px;"&gt;As timer I use the LPTMR with a period of one second:&lt;/p&gt;&lt;p style="margin:0;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;a href="http://mcuoneclipse.files.wordpress.com/2014/03/low-power-1-second-timer.png?w=584"&gt;&lt;img loading="lazy" alt="Low Power 1 Second Timer" src="http://mcuoneclipse.files.wordpress.com/2014/03/low-power-1-second-timer.png?w=584" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p style="margin:0;font-family:&amp;#39;Helvetica Neue&amp;#39;,Helvetica,Arial,sans-serif;font-size:15px;font-style:normal;font-weight:300;margin:0px 0px 1.625em;color:#373737;text-align:start;text-indent:0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:#666666;font-family:Georgia, serif;font-size:12px;font-style:normal;font-weight:300;text-align:start;text-indent:0px;background-color:#eeeeee;"&gt;Low Power 1 Second Timer&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0;font-family:&amp;#39;Helvetica Neue&amp;#39;,Helvetica,Arial,sans-serif;font-size:15px;font-style:normal;font-weight:300;margin:0px 0px 1.625em;color:#373737;text-align:start;text-indent:0px;"&gt;Inside the period settings, I configure it to use the LPO 1 kHz timer as clock source, as this clock still will run in LLS mode:&lt;/p&gt;&lt;p style="margin:0;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;a href="http://mcuoneclipse.files.wordpress.com/2014/03/lpo-1-khz-source.png?w=584"&gt;&lt;img loading="lazy" alt="LPO 1 kHz Source" src="http://mcuoneclipse.files.wordpress.com/2014/03/lpo-1-khz-source.png?w=584" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p style="margin:0;font-family:&amp;#39;Helvetica Neue&amp;#39;,Helvetica,Arial,sans-serif;font-size:15px;font-style:normal;font-weight:300;margin:0px 0px 1.625em;color:#373737;text-align:start;text-indent:0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:#666666;font-family:Georgia, serif;font-size:12px;font-style:normal;font-weight:300;text-align:start;text-indent:0px;background-color:#eeeeee;"&gt;LPO 1 kHz Source&lt;/span&gt;&lt;/p&gt;&lt;h1 style="font-family:&amp;#39;Helvetica Neue&amp;#39;, Helvetica, Arial, sans-serif;font-size:15px;font-style:normal;font-weight:bold;margin:0 0 0.8125em;color:#000000;text-align:start;text-indent:0px;"&gt;CPU Component&lt;/h1&gt;&lt;p style="margin:0;font-family:&amp;#39;Helvetica Neue&amp;#39;, Helvetica, Arial, sans-serif;font-size:15px;font-style:normal;font-weight:300;margin:0 0 1.625em;color:#373737;text-align:start;text-indent:0px;"&gt;First, we need to configure the CPU component to be ready for low power mode. I enable the methods SetOperationMode() and GetLLSWakupFlags() (so the black x is removed):&lt;/p&gt;&lt;p style="margin:0;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;a href="http://mcuoneclipse.files.wordpress.com/2014/03/enabled-setoperationmode-and-getllswakeupflags.png?w=584"&gt;&lt;img loading="lazy" alt="Enabled SetOperationMode and GetLLSWakeupFlags" src="http://mcuoneclipse.files.wordpress.com/2014/03/enabled-setoperationmode-and-getllswakeupflags.png?w=584" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p style="margin:0;font-family:&amp;#39;Helvetica Neue&amp;#39;, Helvetica, Arial, sans-serif;font-size:15px;font-style:normal;font-weight:300;margin:0 0 1.625em;color:#373737;text-align:start;text-indent:0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:#666666;font-family:Georgia, serif;font-size:12px;font-style:normal;font-weight:300;text-align:start;text-indent:0px;background-color:#eeeeee;"&gt;Enabled SetOperationMode and GetLLSWakeupFlags&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0;font-family:&amp;#39;Helvetica Neue&amp;#39;, Helvetica, Arial, sans-serif;font-size:15px;font-style:normal;font-weight:300;margin:0 0 1.625em;color:#373737;text-align:start;text-indent:0px;"&gt;In the CPU properties, I enable all low power modes, configure LPTMR0 as wake-up source, and enable the INT_LLW wake-up interrupt:&lt;/p&gt;&lt;p style="margin:0;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;a href="http://mcuoneclipse.files.wordpress.com/2014/03/enabled-low-power-modes.png?w=584"&gt;&lt;img loading="lazy" alt="Enabled Low Power Modes" src="http://mcuoneclipse.files.wordpress.com/2014/03/enabled-low-power-modes.png?w=584" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p style="margin:0;font-family:&amp;#39;Helvetica Neue&amp;#39;, Helvetica, Arial, sans-serif;font-size:15px;font-style:normal;font-weight:300;margin:0 0 1.625em;color:#373737;text-align:start;text-indent:0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:#666666;font-family:Georgia, serif;font-size:12px;font-style:normal;font-weight:300;text-align:start;text-indent:0px;background-color:#eeeeee;"&gt;Enabled Low Power Modes&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0;font-family:&amp;#39;Helvetica Neue&amp;#39;, Helvetica, Arial, sans-serif;font-size:15px;font-style:normal;font-weight:300;margin:0 0 1.625em;color:#373737;text-align:start;text-indent:0px;"&gt;Then I configure the WAIT, SLEEP and STOP modes (these are the three different low power modes in Processor Expert):&lt;/p&gt;&lt;p style="margin:0;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;a href="http://mcuoneclipse.files.wordpress.com/2014/03/wait-sleep-and-stop-modes.png?w=584"&gt;&lt;img loading="lazy" alt="WAIT, SLEEP and STOP modes" src="http://mcuoneclipse.files.wordpress.com/2014/03/wait-sleep-and-stop-modes.png?w=584" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p style="margin:0;font-family:&amp;#39;Helvetica Neue&amp;#39;, Helvetica, Arial, sans-serif;font-size:15px;font-style:normal;font-weight:300;margin:0 0 1.625em;color:#373737;text-align:start;text-indent:0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:#666666;font-family:Georgia, serif;font-size:12px;font-style:normal;font-weight:300;text-align:start;text-indent:0px;background-color:#eeeeee;"&gt;WAIT, SLEEP and STOP modes&lt;/span&gt;&lt;/p&gt;&lt;h1 style="font-family:&amp;#39;Helvetica Neue&amp;#39;, Helvetica, Arial, sans-serif;font-size:15px;font-style:normal;font-weight:bold;margin:0 0 0.8125em;color:#000000;text-align:start;text-indent:0px;"&gt;Source Files&lt;/h1&gt;&lt;p style="margin:0;font-family:&amp;#39;Helvetica Neue&amp;#39;, Helvetica, Arial, sans-serif;font-size:15px;font-style:normal;font-weight:300;margin:0 0 1.625em;color:#373737;text-align:start;text-indent:0px;"&gt;Time to write the application code. I’m using Application.h and Application.c:&lt;/p&gt;&lt;p class="syntaxhighlighter cpp" style="margin:0;padding:0px;font-family:inherit;font-style:inherit;font-weight:inherit;"&gt;&amp;nbsp;&lt;/p&gt;&lt;table border="0" cellpadding="0" cellspacing="0"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="code" style="border:0px solid black;"&gt;&lt;div class="container"&gt;&lt;div class="number1 alt2 line index0"&gt;&lt;code class="cpp comments"&gt;/*&lt;/code&gt;&lt;p class="number2 alt1 index1 line" style="margin:0;"&gt;&lt;code class="cpp comments"&gt;* Application.h&lt;/code&gt;&lt;/p&gt;&lt;p class="number3 index2 alt2 line" style="margin:0;"&gt;&lt;code class="cpp comments"&gt;*&lt;/code&gt;&lt;/p&gt;&lt;p class="index3 number4 alt1 line" style="margin:0;"&gt;&lt;code class="cpp comments"&gt;*&amp;nbsp; Created on: Mar 16, 2014&lt;/code&gt;&lt;/p&gt;&lt;p class="index4 alt2 number5 line" style="margin:0;"&gt;&lt;code class="cpp comments"&gt;*&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Author: Erich Styger&lt;/code&gt;&lt;/p&gt;&lt;p class="index5 alt1 line number6" style="margin:0;"&gt;&lt;code class="cpp comments"&gt;*/&lt;/code&gt;&lt;/p&gt;&lt;p class="index7 number8 alt1 line" style="margin:0;"&gt;&lt;code class="cpp preprocessor"&gt;#ifndef APPLICATION_H_&lt;/code&gt;&lt;/p&gt;&lt;p class="number9 alt2 line index8" style="margin:0;"&gt;&lt;code class="cpp preprocessor"&gt;#define APPLICATION_H_&lt;/code&gt;&lt;/p&gt;&lt;p class="alt2 index10 number11 line" style="margin:0;"&gt;&lt;code class="cpp comments"&gt;/*! \brief callback called from the LLS wake-up interrupt */&lt;/code&gt;&lt;/p&gt;&lt;p class="alt1 number12 line index11" style="margin:0;"&gt;&lt;code class="keyword cpp bold"&gt;void&lt;/code&gt;&lt;code class="cpp plain"&gt;APP_OnLLSWakeUpInterrupt(&lt;/code&gt;&lt;code class="keyword cpp bold"&gt;void&lt;/code&gt;&lt;code class="cpp plain"&gt;);&lt;/code&gt;&lt;/p&gt;&lt;p class="index13 number14 alt1 line" style="margin:0;"&gt;&lt;code class="cpp comments"&gt;/*! \brief callback called from low power timer interrupt */&lt;/code&gt;&lt;/p&gt;&lt;p class="index14 number15 alt2 line" style="margin:0;"&gt;&lt;code class="keyword cpp bold"&gt;void&lt;/code&gt;&lt;code class="cpp plain"&gt;APP_TimerInterrupt(&lt;/code&gt;&lt;code class="keyword cpp bold"&gt;void&lt;/code&gt;&lt;code class="cpp plain"&gt;);&lt;/code&gt;&lt;/p&gt;&lt;p class="number17 index16 alt2 line" style="margin:0;"&gt;&lt;code class="cpp comments"&gt;/*! \brief application main entry point */&lt;/code&gt;&lt;/p&gt;&lt;p class="index17 alt1 line number18" style="margin:0;"&gt;&lt;code class="keyword cpp bold"&gt;void&lt;/code&gt;&lt;code class="cpp plain"&gt;APP_Run(&lt;/code&gt;&lt;code class="keyword cpp bold"&gt;void&lt;/code&gt;&lt;code class="cpp plain"&gt;);&lt;/code&gt;&lt;/p&gt;&lt;p class="number20 alt1 index19 line" style="margin:0;"&gt;&lt;code class="cpp preprocessor"&gt;#endif /* APPLICATION_H_ */&lt;/code&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p style="margin:0;padding:0px;font-family:&amp;#39;Helvetica Neue&amp;#39;, Helvetica, Arial, sans-serif;font-size:15px;font-style:normal;font-weight:300;margin:0 0 1.625em;color:#373737;text-align:start;text-indent:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;font-family:&amp;#39;Helvetica Neue&amp;#39;, Helvetica, Arial, sans-serif;font-size:15px;font-style:normal;font-weight:300;margin:0 0 1.625em;color:#373737;text-align:start;text-indent:0px;"&gt;The the Application.c looks like this:&lt;/p&gt;&lt;table border="0" cellpadding="0" cellspacing="0"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="gutter" style="border:0px solid black;"&gt;&lt;div class="number1 alt2 line index0"&gt;1&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="number2 alt1 index1 line" style="margin:0;"&gt;2&lt;/p&gt;&lt;p class="number3 index2 alt2 line" style="margin:0;"&gt;3&lt;/p&gt;&lt;p class="index3 number4 alt1 line" style="margin:0;"&gt;4&lt;/p&gt;&lt;p class="index4 alt2 number5 line" style="margin:0;"&gt;5&lt;/p&gt;&lt;p class="index5 alt1 line number6" style="margin:0;"&gt;6&lt;/p&gt;&lt;p class="number7 alt2 index6 line" style="margin:0;"&gt;7&lt;/p&gt;&lt;p class="index7 number8 alt1 line" style="margin:0;"&gt;8&lt;/p&gt;&lt;p class="number9 alt2 line index8" style="margin:0;"&gt;9&lt;/p&gt;&lt;p class="alt1 line index9 number10" style="margin:0;"&gt;10&lt;/p&gt;&lt;p class="alt2 index10 number11 line" style="margin:0;"&gt;11&lt;/p&gt;&lt;p class="alt1 number12 line index11" style="margin:0;"&gt;12&lt;/p&gt;&lt;p class="number13 alt2 line index12" style="margin:0;"&gt;13&lt;/p&gt;&lt;p class="index13 number14 alt1 line" style="margin:0;"&gt;14&lt;/p&gt;&lt;p class="index14 number15 alt2 line" style="margin:0;"&gt;15&lt;/p&gt;&lt;p class="number16 index15 alt1 line" style="margin:0;"&gt;16&lt;/p&gt;&lt;p class="number17 index16 alt2 line" style="margin:0;"&gt;17&lt;/p&gt;&lt;p class="index17 alt1 line number18" style="margin:0;"&gt;18&lt;/p&gt;&lt;p class="alt2 index18 line number19" style="margin:0;"&gt;19&lt;/p&gt;&lt;p class="number20 alt1 index19 line" style="margin:0;"&gt;20&lt;/p&gt;&lt;p class="alt2 index20 line number21" style="margin:0;"&gt;21&lt;/p&gt;&lt;p class="alt1 index21 number22 line" style="margin:0;"&gt;22&lt;/p&gt;&lt;p class="alt2 number23 index22 line" style="margin:0;"&gt;23&lt;/p&gt;&lt;p class="number24 alt1 line index23" style="margin:0;"&gt;24&lt;/p&gt;&lt;p class="index24 number25 alt2 line" style="margin:0;"&gt;25&lt;/p&gt;&lt;p class="index25 number26 alt1 line" style="margin:0;"&gt;26&lt;/p&gt;&lt;p class="number27 index26 alt2 line" style="margin:0;"&gt;27&lt;/p&gt;&lt;p class="number28 index27 alt1 line" style="margin:0;"&gt;28&lt;/p&gt;&lt;p class="alt2 index28 line number29" style="margin:0;"&gt;29&lt;/p&gt;&lt;p class="number30 alt1 index29 line" style="margin:0;"&gt;30&lt;/p&gt;&lt;p class="number31 index30 alt2 line" style="margin:0;"&gt;31&lt;/p&gt;&lt;p class="index31 alt1 line number32" style="margin:0;"&gt;32&lt;/p&gt;&lt;p class="alt2 index32 number33 line" style="margin:0;"&gt;33&lt;/p&gt;&lt;p class="number34 alt1 index33 line" style="margin:0;"&gt;34&lt;/p&gt;&lt;p class="number35 alt2 line index34" style="margin:0;"&gt;35&lt;/p&gt;&lt;p class="index35 number36 alt1 line" style="margin:0;"&gt;36&lt;/p&gt;&lt;p class="index36 number37 alt2 line" style="margin:0;"&gt;37&lt;/p&gt;&lt;p class="number38 index37 alt1 line" style="margin:0;"&gt;38&lt;/p&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code" style="border:0px solid black;"&gt;&lt;p class="container" style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;div class="number1 alt2 line index0"&gt;&lt;code class="cpp comments"&gt;/*&lt;/code&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="number2 alt1 index1 line" style="margin:0;"&gt;&lt;code class="cpp comments"&gt;* Application.c&lt;/code&gt;&lt;/p&gt;&lt;p class="number3 index2 alt2 line" style="margin:0;"&gt;&lt;code class="cpp comments"&gt;*&lt;/code&gt;&lt;/p&gt;&lt;p class="index3 number4 alt1 line" style="margin:0;"&gt;&lt;code class="cpp comments"&gt;*&amp;nbsp; Created on: Mar 16, 2014&lt;/code&gt;&lt;/p&gt;&lt;p class="index4 alt2 number5 line" style="margin:0;"&gt;&lt;code class="cpp comments"&gt;*&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Author: Erich Styger&lt;/code&gt;&lt;/p&gt;&lt;p class="index5 alt1 line number6" style="margin:0;"&gt;&lt;code class="cpp comments"&gt;*/&lt;/code&gt;&lt;/p&gt;&lt;p class="number7 alt2 index6 line" style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="index7 number8 alt1 line" style="margin:0;"&gt;&lt;code class="cpp preprocessor"&gt;#include &amp;quot;Application.h&amp;quot;&lt;/code&gt;&lt;/p&gt;&lt;p class="number9 alt2 line index8" style="margin:0;"&gt;&lt;code class="cpp preprocessor"&gt;#include &amp;quot;LED1.h&amp;quot;&lt;/code&gt;&lt;/p&gt;&lt;p class="alt1 line index9 number10" style="margin:0;"&gt;&lt;code class="cpp preprocessor"&gt;#include &amp;quot;LED2.h&amp;quot;&lt;/code&gt;&lt;/p&gt;&lt;p class="alt2 index10 number11 line" style="margin:0;"&gt;&lt;code class="cpp preprocessor"&gt;#include &amp;quot;LED3.h&amp;quot;&lt;/code&gt;&lt;/p&gt;&lt;p class="alt1 number12 line index11" style="margin:0;"&gt;&lt;code class="cpp preprocessor"&gt;#include &amp;quot;WAIT1.h&amp;quot;&lt;/code&gt;&lt;/p&gt;&lt;p class="number13 alt2 line index12" style="margin:0;"&gt;&lt;code class="cpp preprocessor"&gt;#include &amp;quot;LPTMR_PDD.h&amp;quot;&lt;/code&gt;&lt;/p&gt;&lt;p class="index13 number14 alt1 line" style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="index14 number15 alt2 line" style="margin:0;"&gt;&lt;code class="keyword cpp bold"&gt;void&lt;/code&gt; &lt;code class="cpp plain"&gt;APP_OnLLSWakeUpInterrupt(&lt;/code&gt;&lt;code class="keyword cpp bold"&gt;void&lt;/code&gt;&lt;code class="cpp plain"&gt;) {&lt;/code&gt;&lt;/p&gt;&lt;p class="number16 index15 alt1 line" style="margin:0;"&gt;&lt;code class="spaces cpp"&gt;&amp;nbsp; &lt;/code&gt;&lt;code class="cpp plain"&gt;uint32_t tmp;&lt;/code&gt;&lt;/p&gt;&lt;p class="number17 index16 alt2 line" style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="index17 alt1 line number18" style="margin:0;"&gt;&lt;code class="spaces cpp"&gt;&amp;nbsp; &lt;/code&gt;&lt;code class="cpp plain"&gt;tmp = Cpu_GetLLSWakeUpFlags();&lt;/code&gt;&lt;/p&gt;&lt;p class="alt2 index18 line number19" style="margin:0;"&gt;&lt;code class="spaces cpp"&gt;&amp;nbsp; &lt;/code&gt;&lt;code class="keyword cpp bold"&gt;if&lt;/code&gt; &lt;code class="cpp plain"&gt;(tmp&amp;amp;LLWU_INT_MODULE0) { &lt;/code&gt;&lt;code class="cpp comments"&gt;/* LPTMR */&lt;/code&gt;&lt;/p&gt;&lt;p class="number20 alt1 index19 line" style="margin:0;"&gt;&lt;code class="spaces cpp"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/code&gt;&lt;code class="cpp plain"&gt;LPTMR_PDD_ClearInterruptFlag(LPTMR0_BASE_PTR); &lt;/code&gt;&lt;code class="cpp comments"&gt;/* Clear interrupt flag */&lt;/code&gt;&lt;/p&gt;&lt;p class="alt2 index20 line number21" style="margin:0;"&gt;&lt;code class="spaces cpp"&gt;&amp;nbsp; &lt;/code&gt;&lt;code class="cpp plain"&gt;}&lt;/code&gt;&lt;/p&gt;&lt;p class="alt1 index21 number22 line" style="margin:0;"&gt;&lt;code class="cpp plain"&gt;}&lt;/code&gt;&lt;/p&gt;&lt;p class="alt2 number23 index22 line" style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="number24 alt1 line index23" style="margin:0;"&gt;&lt;code class="keyword cpp bold"&gt;void&lt;/code&gt; &lt;code class="cpp plain"&gt;APP_TimerInterrupt(&lt;/code&gt;&lt;code class="keyword cpp bold"&gt;void&lt;/code&gt;&lt;code class="cpp plain"&gt;) {&lt;/code&gt;&lt;/p&gt;&lt;p class="index24 number25 alt2 line" style="margin:0;"&gt;&lt;code class="spaces cpp"&gt;&amp;nbsp; &lt;/code&gt;&lt;code class="cpp plain"&gt;LED1_Neg(); &lt;/code&gt;&lt;code class="cpp comments"&gt;/* red LED */&lt;/code&gt;&lt;/p&gt;&lt;p class="index25 number26 alt1 line" style="margin:0;"&gt;&lt;code class="cpp plain"&gt;}&lt;/code&gt;&lt;/p&gt;&lt;p class="number27 index26 alt2 line" style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="number28 index27 alt1 line" style="margin:0;"&gt;&lt;code class="keyword cpp bold"&gt;void&lt;/code&gt; &lt;code class="cpp plain"&gt;APP_Run(&lt;/code&gt;&lt;code class="keyword cpp bold"&gt;void&lt;/code&gt;&lt;code class="cpp plain"&gt;) {&lt;/code&gt;&lt;/p&gt;&lt;p class="alt2 index28 line number29" style="margin:0;"&gt;&lt;code class="spaces cpp"&gt;&amp;nbsp; &lt;/code&gt;&lt;code class="cpp plain"&gt;LED2_On();&lt;/code&gt;&lt;/p&gt;&lt;p class="number30 alt1 index29 line" style="margin:0;"&gt;&lt;code class="spaces cpp"&gt;&amp;nbsp; &lt;/code&gt;&lt;code class="cpp plain"&gt;WAIT1_Waitms(1000);&lt;/code&gt;&lt;/p&gt;&lt;p class="number31 index30 alt2 line" style="margin:0;"&gt;&lt;code class="spaces cpp"&gt;&amp;nbsp; &lt;/code&gt;&lt;code class="cpp plain"&gt;LED2_Off();&lt;/code&gt;&lt;/p&gt;&lt;p class="index31 alt1 line number32" style="margin:0;"&gt;&lt;code class="spaces cpp"&gt;&amp;nbsp; &lt;/code&gt;&lt;code class="keyword cpp bold"&gt;for&lt;/code&gt;&lt;code class="cpp plain"&gt;(;;) {&lt;/code&gt;&lt;/p&gt;&lt;p class="alt2 index32 number33 line" style="margin:0;"&gt;&lt;code class="spaces cpp"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/code&gt;&lt;code class="cpp comments"&gt;//LED3_Neg(); /* blue LED */&lt;/code&gt;&lt;/p&gt;&lt;p class="number34 alt1 index33 line" style="margin:0;"&gt;&lt;code class="spaces cpp"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/code&gt;&lt;code class="cpp comments"&gt;//Cpu_SetOperationMode(DOM_WAIT, NULL, NULL); /* next interrupt will wake us up */&lt;/code&gt;&lt;/p&gt;&lt;p class="number35 alt2 line index34" style="margin:0;"&gt;&lt;code class="spaces cpp"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/code&gt;&lt;code class="cpp comments"&gt;//Cpu_SetOperationMode(DOM_SLEEP, NULL, NULL); /* next interrupt will wake us up */&lt;/code&gt;&lt;/p&gt;&lt;p class="index35 number36 alt1 line" style="margin:0;"&gt;&lt;code class="spaces cpp"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/code&gt;&lt;code class="cpp plain"&gt;Cpu_SetOperationMode(DOM_STOP, NULL, NULL); &lt;/code&gt;&lt;code class="cpp comments"&gt;/* next interrupt will wake us up */&lt;/code&gt;&lt;/p&gt;&lt;p class="index36 number37 alt2 line" style="margin:0;"&gt;&lt;code class="spaces cpp"&gt;&amp;nbsp; &lt;/code&gt;&lt;code class="cpp plain"&gt;}&lt;/code&gt;&lt;/p&gt;&lt;p class="number38 index37 alt1 line" style="margin:0;"&gt;&lt;code class="cpp plain"&gt;}&lt;/code&gt;&lt;/p&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p style="margin:0;font-family:&amp;#39;Helvetica Neue&amp;#39;, Helvetica, Arial, sans-serif;font-size:15px;font-style:normal;font-weight:300;margin:0 0 1.625em;color:#373737;text-align:start;text-indent:0px;"&gt;From main() in ProcessorExpert.c I call APP_Run():&lt;/p&gt;&lt;p style="margin:0;padding:0px;font-family:&amp;#39;Helvetica Neue&amp;#39;, Helvetica, Arial, sans-serif;font-size:15px;font-style:normal;font-weight:300;color:#373737;text-align:start;text-indent:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;div class="syntaxhighlighter cpp" style="font-family:inherit;font-style:inherit;font-weight:inherit;"&gt;&lt;table border="0" cellpadding="0" cellspacing="0"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="gutter" style="border:0px solid black;"&gt;&lt;div class="number1 alt2 line index0"&gt;1&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="number2 alt1 index1 line" style="margin:0;"&gt;2&lt;/p&gt;&lt;p class="number3 index2 alt2 line" style="margin:0;"&gt;3&lt;/p&gt;&lt;p class="index3 number4 alt1 line" style="margin:0;"&gt;4&lt;/p&gt;&lt;p class="index4 alt2 number5 line" style="margin:0;"&gt;5&lt;/p&gt;&lt;p class="index5 alt1 line number6" style="margin:0;"&gt;6&lt;/p&gt;&lt;p class="number7 alt2 index6 line highlighted" style="margin:0;"&gt;7&lt;/p&gt;&lt;p class="index7 number8 alt1 line" style="margin:0;"&gt;8&lt;/p&gt;&lt;p class="number9 alt2 line index8" style="margin:0;"&gt;9&lt;/p&gt;&lt;p class="alt1 line index9 number10" style="margin:0;"&gt;10&lt;/p&gt;&lt;p class="alt2 index10 number11 line" style="margin:0;"&gt;11&lt;/p&gt;&lt;p class="alt1 number12 line index11" style="margin:0;"&gt;12&lt;/p&gt;&lt;p class="number13 alt2 line index12" style="margin:0;"&gt;13&lt;/p&gt;&lt;p class="index13 number14 alt1 line" style="margin:0;"&gt;14&lt;/p&gt;&lt;p class="index14 number15 alt2 line" style="margin:0;"&gt;15&lt;/p&gt;&lt;p class="number16 index15 alt1 line" style="margin:0;"&gt;16&lt;/p&gt;&lt;p class="number17 index16 alt2 line" style="margin:0;"&gt;17&lt;/p&gt;&lt;p class="index17 alt1 line number18" style="margin:0;"&gt;18&lt;/p&gt;&lt;p class="alt2 index18 line highlighted number19" style="margin:0;"&gt;19&lt;/p&gt;&lt;p class="number20 alt1 index19 line" style="margin:0;"&gt;20&lt;/p&gt;&lt;p class="alt2 index20 line number21" style="margin:0;"&gt;21&lt;/p&gt;&lt;p class="alt1 index21 number22 line" style="margin:0;"&gt;22&lt;/p&gt;&lt;p class="alt2 number23 index22 line" style="margin:0;"&gt;23&lt;/p&gt;&lt;p class="number24 alt1 line index23" style="margin:0;"&gt;24&lt;/p&gt;&lt;p class="index24 number25 alt2 line" style="margin:0;"&gt;25&lt;/p&gt;&lt;p class="index25 number26 alt1 line" style="margin:0;"&gt;26&lt;/p&gt;&lt;p class="number27 index26 alt2 line" style="margin:0;"&gt;27&lt;/p&gt;&lt;p class="number28 index27 alt1 line" style="margin:0;"&gt;28&lt;/p&gt;&lt;p class="alt2 index28 line number29" style="margin:0;"&gt;29&lt;/p&gt;&lt;p class="number30 alt1 index29 line" style="margin:0;"&gt;30&lt;/p&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code" style="border:0px solid black;"&gt;&lt;p class="container" style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;div class="number1 alt2 line index0"&gt;&lt;code class="cpp preprocessor"&gt;#include &amp;quot;PE_Types.h&amp;quot;&lt;/code&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="number2 alt1 index1 line" style="margin:0;"&gt;&lt;code class="cpp preprocessor"&gt;#include &amp;quot;PE_Error.h&amp;quot;&lt;/code&gt;&lt;/p&gt;&lt;p class="number3 index2 alt2 line" style="margin:0;"&gt;&lt;code class="cpp preprocessor"&gt;#include &amp;quot;PE_Const.h&amp;quot;&lt;/code&gt;&lt;/p&gt;&lt;p class="index3 number4 alt1 line" style="margin:0;"&gt;&lt;code class="cpp preprocessor"&gt;#include &amp;quot;IO_Map.h&amp;quot;&lt;/code&gt;&lt;/p&gt;&lt;p class="index4 alt2 number5 line" style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="index5 alt1 line number6" style="margin:0;"&gt;&lt;code class="cpp comments"&gt;/* User includes (#include below this line is not maintained by Processor Expert) */&lt;/code&gt;&lt;/p&gt;&lt;p class="number7 alt2 index6 line highlighted" style="margin:0;"&gt;&lt;code class="cpp preprocessor"&gt;#include &amp;quot;Application.h&amp;quot;&lt;/code&gt;&lt;/p&gt;&lt;p class="index7 number8 alt1 line" style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="number9 alt2 line index8" style="margin:0;"&gt;&lt;code class="cpp comments"&gt;/*lint -save&amp;nbsp; -e970 Disable MISRA rule (6.3) checking. */&lt;/code&gt;&lt;/p&gt;&lt;p class="alt1 line index9 number10" style="margin:0;"&gt;&lt;code class="color1 cpp bold"&gt;int&lt;/code&gt; &lt;code class="cpp plain"&gt;main(&lt;/code&gt;&lt;code class="keyword cpp bold"&gt;void&lt;/code&gt;&lt;code class="cpp plain"&gt;)&lt;/code&gt;&lt;/p&gt;&lt;p class="alt2 index10 number11 line" style="margin:0;"&gt;&lt;code class="cpp comments"&gt;/*lint -restore Enable MISRA rule (6.3) checking. */&lt;/code&gt;&lt;/p&gt;&lt;p class="alt1 number12 line index11" style="margin:0;"&gt;&lt;code class="cpp plain"&gt;{&lt;/code&gt;&lt;/p&gt;&lt;p class="number13 alt2 line index12" style="margin:0;"&gt;&lt;code class="spaces cpp"&gt;&amp;nbsp; &lt;/code&gt;&lt;code class="cpp comments"&gt;/* Write your local variable definition here */&lt;/code&gt;&lt;/p&gt;&lt;p class="index13 number14 alt1 line" style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="index14 number15 alt2 line" style="margin:0;"&gt;&lt;code class="spaces cpp"&gt;&amp;nbsp; &lt;/code&gt;&lt;code class="cpp comments"&gt;/*** Processor Expert internal initialization. DON&amp;#39;T REMOVE THIS CODE!!! ***/&lt;/code&gt;&lt;/p&gt;&lt;p class="number16 index15 alt1 line" style="margin:0;"&gt;&lt;code class="spaces cpp"&gt;&amp;nbsp; &lt;/code&gt;&lt;code class="cpp plain"&gt;PE_low_level_init();&lt;/code&gt;&lt;/p&gt;&lt;p class="number17 index16 alt2 line" style="margin:0;"&gt;&lt;code class="spaces cpp"&gt;&amp;nbsp; &lt;/code&gt;&lt;code class="cpp comments"&gt;/*** End of Processor Expert internal initialization.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ***/&lt;/code&gt;&lt;/p&gt;&lt;p class="index17 alt1 line number18" style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="alt2 index18 line highlighted number19" style="margin:0;"&gt;&lt;code class="spaces cpp"&gt;&amp;nbsp; &lt;/code&gt;&lt;code class="cpp plain"&gt;APP_Run();&lt;/code&gt;&lt;/p&gt;&lt;p class="number20 alt1 index19 line" style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="alt2 index20 line number21" style="margin:0;"&gt;&lt;code class="spaces cpp"&gt;&amp;nbsp; &lt;/code&gt;&lt;code class="cpp comments"&gt;/*** Don&amp;#39;t write any code pass this line, or it will be deleted during code generation. ***/&lt;/code&gt;&lt;/p&gt;&lt;p class="alt1 index21 number22 line" style="margin:0;"&gt;&lt;code class="spaces cpp"&gt;&amp;nbsp; &lt;/code&gt;&lt;code class="cpp comments"&gt;/*** RTOS startup code. Macro PEX_RTOS_START is defined by the RTOS component. DON&amp;#39;T MODIFY THIS CODE!!! ***/&lt;/code&gt;&lt;/p&gt;&lt;p class="alt2 number23 index22 line" style="margin:0;"&gt;&lt;code class="spaces cpp"&gt;&amp;nbsp; &lt;/code&gt;&lt;code class="cpp preprocessor"&gt;#ifdef PEX_RTOS_START&lt;/code&gt;&lt;/p&gt;&lt;p class="number24 alt1 line index23" style="margin:0;"&gt;&lt;code class="spaces cpp"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/code&gt;&lt;code class="cpp plain"&gt;PEX_RTOS_START();&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/code&gt;&lt;code class="cpp comments"&gt;/* Startup of the selected RTOS. Macro is defined by the RTOS component. */&lt;/code&gt;&lt;/p&gt;&lt;p class="index24 number25 alt2 line" style="margin:0;"&gt;&lt;code class="spaces cpp"&gt;&amp;nbsp; &lt;/code&gt;&lt;code class="cpp preprocessor"&gt;#endif&lt;/code&gt;&lt;/p&gt;&lt;p class="index25 number26 alt1 line" style="margin:0;"&gt;&lt;code class="spaces cpp"&gt;&amp;nbsp; &lt;/code&gt;&lt;code class="cpp comments"&gt;/*** End of RTOS startup code.&amp;nbsp; ***/&lt;/code&gt;&lt;/p&gt;&lt;p class="number27 index26 alt2 line" style="margin:0;"&gt;&lt;code class="spaces cpp"&gt;&amp;nbsp; &lt;/code&gt;&lt;code class="cpp comments"&gt;/*** Processor Expert end of main routine. DON&amp;#39;T MODIFY THIS CODE!!! ***/&lt;/code&gt;&lt;/p&gt;&lt;p class="number28 index27 alt1 line" style="margin:0;"&gt;&lt;code class="spaces cpp"&gt;&amp;nbsp; &lt;/code&gt;&lt;code class="keyword cpp bold"&gt;for&lt;/code&gt;&lt;code class="cpp plain"&gt;(;;){}&lt;/code&gt;&lt;/p&gt;&lt;p class="alt2 index28 line number29" style="margin:0;"&gt;&lt;code class="spaces cpp"&gt;&amp;nbsp; &lt;/code&gt;&lt;code class="cpp comments"&gt;/*** Processor Expert end of main routine. DON&amp;#39;T WRITE CODE BELOW!!! ***/&lt;/code&gt;&lt;/p&gt;&lt;p class="number30 alt1 index29 line" style="margin:0;"&gt;&lt;code class="cpp plain"&gt;} &lt;/code&gt;&lt;code class="cpp comments"&gt;/*** End of main routine. DO NOT MODIFY THIS TEXT!!! ***/&lt;/code&gt;&lt;/p&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p style="margin:0;font-family:&amp;#39;Helvetica Neue&amp;#39;, Helvetica, Arial, sans-serif;font-size:15px;font-style:normal;font-weight:300;margin:0 0 1.625em;color:#373737;text-align:start;text-indent:0px;"&gt;And from Events.c I call my hooks:&lt;/p&gt;&lt;p style="margin:0;padding:0px;font-family:&amp;#39;Helvetica Neue&amp;#39;, Helvetica, Arial, sans-serif;font-size:15px;font-style:normal;font-weight:300;color:#373737;text-align:start;text-indent:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;div class="syntaxhighlighter cpp" style="font-family:inherit;font-style:inherit;font-weight:inherit;"&gt;&lt;table border="0" cellpadding="0" cellspacing="0"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="gutter" style="border:0px solid black;"&gt;&lt;div class="number1 alt2 line index0"&gt;1&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="number2 alt1 index1 line" style="margin:0;"&gt;2&lt;/p&gt;&lt;p class="number3 index2 alt2 line" style="margin:0;"&gt;3&lt;/p&gt;&lt;p class="index3 number4 alt1 line" style="margin:0;"&gt;4&lt;/p&gt;&lt;p class="index4 alt2 number5 line" style="margin:0;"&gt;5&lt;/p&gt;&lt;p class="index5 alt1 line number6" style="margin:0;"&gt;6&lt;/p&gt;&lt;p class="number7 alt2 index6 line" style="margin:0;"&gt;7&lt;/p&gt;&lt;p class="index7 number8 alt1 line" style="margin:0;"&gt;8&lt;/p&gt;&lt;p class="number9 alt2 line index8" style="margin:0;"&gt;9&lt;/p&gt;&lt;p class="alt1 line index9 number10" style="margin:0;"&gt;10&lt;/p&gt;&lt;p class="alt2 index10 number11 line" style="margin:0;"&gt;11&lt;/p&gt;&lt;p class="alt1 number12 line index11" style="margin:0;"&gt;12&lt;/p&gt;&lt;p class="number13 alt2 line index12" style="margin:0;"&gt;13&lt;/p&gt;&lt;p class="index13 number14 alt1 line" style="margin:0;"&gt;14&lt;/p&gt;&lt;p class="index14 number15 alt2 line" style="margin:0;"&gt;15&lt;/p&gt;&lt;p class="number16 index15 alt1 line" style="margin:0;"&gt;16&lt;/p&gt;&lt;p class="number17 index16 alt2 line highlighted" style="margin:0;"&gt;17&lt;/p&gt;&lt;p class="index17 alt1 line number18" style="margin:0;"&gt;18&lt;/p&gt;&lt;p class="alt2 index18 line number19" style="margin:0;"&gt;19&lt;/p&gt;&lt;p class="number20 alt1 index19 line" style="margin:0;"&gt;20&lt;/p&gt;&lt;p class="alt2 index20 line number21" style="margin:0;"&gt;21&lt;/p&gt;&lt;p class="alt1 index21 number22 line" style="margin:0;"&gt;22&lt;/p&gt;&lt;p class="alt2 number23 index22 line" style="margin:0;"&gt;23&lt;/p&gt;&lt;p class="number24 alt1 line index23" style="margin:0;"&gt;24&lt;/p&gt;&lt;p class="index24 number25 alt2 line" style="margin:0;"&gt;25&lt;/p&gt;&lt;p class="index25 number26 alt1 line" style="margin:0;"&gt;26&lt;/p&gt;&lt;p class="number27 index26 alt2 line" style="margin:0;"&gt;27&lt;/p&gt;&lt;p class="number28 index27 alt1 line" style="margin:0;"&gt;28&lt;/p&gt;&lt;p class="alt2 index28 line number29" style="margin:0;"&gt;29&lt;/p&gt;&lt;p class="number30 alt1 index29 line" style="margin:0;"&gt;30&lt;/p&gt;&lt;p class="number31 index30 alt2 line" style="margin:0;"&gt;31&lt;/p&gt;&lt;p class="index31 alt1 line number32" style="margin:0;"&gt;32&lt;/p&gt;&lt;p class="alt2 index32 number33 line" style="margin:0;"&gt;33&lt;/p&gt;&lt;p class="number34 alt1 index33 line" style="margin:0;"&gt;34&lt;/p&gt;&lt;p class="number35 alt2 line index34" style="margin:0;"&gt;35&lt;/p&gt;&lt;p class="index35 number36 alt1 line" style="margin:0;"&gt;36&lt;/p&gt;&lt;p class="index36 number37 alt2 line" style="margin:0;"&gt;37&lt;/p&gt;&lt;p class="number38 index37 alt1 line" style="margin:0;"&gt;38&lt;/p&gt;&lt;p class="number39 index38 alt2 line" style="margin:0;"&gt;39&lt;/p&gt;&lt;p class="number40 index39 alt1 line highlighted" style="margin:0;"&gt;40&lt;/p&gt;&lt;p class="number41 index40 alt2 line" style="margin:0;"&gt;41&lt;/p&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code" style="border:0px solid black;"&gt;&lt;p class="container" style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;div class="number1 alt2 line index0"&gt;&lt;code class="cpp comments"&gt;/*&lt;/code&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="number2 alt1 index1 line" style="margin:0;"&gt;&lt;code class="cpp comments"&gt;** ===================================================================&lt;/code&gt;&lt;/p&gt;&lt;p class="number3 index2 alt2 line" style="margin:0;"&gt;&lt;code class="cpp comments"&gt;**&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Event&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :&amp;nbsp; TI1_OnInterrupt (module Events)&lt;/code&gt;&lt;/p&gt;&lt;p class="index3 number4 alt1 line" style="margin:0;"&gt;&lt;code class="cpp comments"&gt;**&lt;/code&gt;&lt;/p&gt;&lt;p class="index4 alt2 number5 line" style="margin:0;"&gt;&lt;code class="cpp comments"&gt;**&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Component&amp;nbsp;&amp;nbsp; :&amp;nbsp; TI1 [TimerInt]&lt;/code&gt;&lt;/p&gt;&lt;p class="index5 alt1 line number6" style="margin:0;"&gt;&lt;code class="cpp comments"&gt;**&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Description :&lt;/code&gt;&lt;/p&gt;&lt;p class="number7 alt2 index6 line" style="margin:0;"&gt;&lt;code class="cpp comments"&gt;**&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; When a timer interrupt occurs this event is called (only&lt;/code&gt;&lt;/p&gt;&lt;p class="index7 number8 alt1 line" style="margin:0;"&gt;&lt;code class="cpp comments"&gt;**&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; when the component is enabled -&amp;nbsp; and the events are&lt;/code&gt;&lt;/p&gt;&lt;p class="number9 alt2 line index8" style="margin:0;"&gt;&lt;code class="cpp comments"&gt;**&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; enabled - ). This event is enabled only if a&lt;/code&gt;&lt;/p&gt;&lt;p class="alt1 line index9 number10" style="margin:0;"&gt;&lt;code class="cpp comments"&gt;**&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; is enabled.&lt;/code&gt;&lt;/p&gt;&lt;p class="alt2 index10 number11 line" style="margin:0;"&gt;&lt;code class="cpp comments"&gt;**&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Parameters&amp;nbsp; : None&lt;/code&gt;&lt;/p&gt;&lt;p class="alt1 number12 line index11" style="margin:0;"&gt;&lt;code class="cpp comments"&gt;**&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Returns&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : Nothing&lt;/code&gt;&lt;/p&gt;&lt;p class="number13 alt2 line index12" style="margin:0;"&gt;&lt;code class="cpp comments"&gt;** ===================================================================&lt;/code&gt;&lt;/p&gt;&lt;p class="index13 number14 alt1 line" style="margin:0;"&gt;&lt;code class="cpp comments"&gt;*/&lt;/code&gt;&lt;/p&gt;&lt;p class="index14 number15 alt2 line" style="margin:0;"&gt;&lt;code class="keyword cpp bold"&gt;void&lt;/code&gt; &lt;code class="cpp plain"&gt;TI1_OnInterrupt(&lt;/code&gt;&lt;code class="keyword cpp bold"&gt;void&lt;/code&gt;&lt;code class="cpp plain"&gt;)&lt;/code&gt;&lt;/p&gt;&lt;p class="number16 index15 alt1 line" style="margin:0;"&gt;&lt;code class="cpp plain"&gt;{&lt;/code&gt;&lt;/p&gt;&lt;p class="number17 index16 alt2 line highlighted" style="margin:0;"&gt;&lt;code class="spaces cpp"&gt;&amp;nbsp; &lt;/code&gt;&lt;code class="cpp plain"&gt;APP_TimerInterrupt();&lt;/code&gt;&lt;/p&gt;&lt;p class="index17 alt1 line number18" style="margin:0;"&gt;&lt;code class="cpp plain"&gt;}&lt;/code&gt;&lt;/p&gt;&lt;p class="alt2 index18 line number19" style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="number20 alt1 index19 line" style="margin:0;"&gt;&lt;code class="cpp comments"&gt;/*&lt;/code&gt;&lt;/p&gt;&lt;p class="alt2 index20 line number21" style="margin:0;"&gt;&lt;code class="cpp comments"&gt;** ===================================================================&lt;/code&gt;&lt;/p&gt;&lt;p class="alt1 index21 number22 line" style="margin:0;"&gt;&lt;code class="cpp comments"&gt;**&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Event&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :&amp;nbsp; Cpu_OnLLSWakeUpINT (module Events)&lt;/code&gt;&lt;/p&gt;&lt;p class="alt2 number23 index22 line" style="margin:0;"&gt;&lt;code class="cpp comments"&gt;**&lt;/code&gt;&lt;/p&gt;&lt;p class="number24 alt1 line index23" style="margin:0;"&gt;&lt;code class="cpp comments"&gt;**&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Component&amp;nbsp;&amp;nbsp; :&amp;nbsp; Cpu [MKL25Z128LK4]&lt;/code&gt;&lt;/p&gt;&lt;p class="index24 number25 alt2 line" style="margin:0;"&gt;&lt;code class="cpp comments"&gt;*/&lt;/code&gt;&lt;/p&gt;&lt;p class="index25 number26 alt1 line" style="margin:0;"&gt;&lt;code class="cpp comments"&gt;/*!&lt;/code&gt;&lt;/p&gt;&lt;p class="number27 index26 alt2 line" style="margin:0;"&gt;&lt;code class="cpp comments"&gt;**&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @brief&lt;/code&gt;&lt;/p&gt;&lt;p class="number28 index27 alt1 line" style="margin:0;"&gt;&lt;code class="cpp comments"&gt;**&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; This event is called when Low Leakage WakeUp interrupt&lt;/code&gt;&lt;/p&gt;&lt;p class="alt2 index28 line number29" style="margin:0;"&gt;&lt;code class="cpp comments"&gt;**&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; occurs. LLWU flags indicating source of the wakeup can be&lt;/code&gt;&lt;/p&gt;&lt;p class="number30 alt1 index29 line" style="margin:0;"&gt;&lt;code class="cpp comments"&gt;**&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; obtained by calling the [GetLLSWakeUpFlags] method. Flags&lt;/code&gt;&lt;/p&gt;&lt;p class="number31 index30 alt2 line" style="margin:0;"&gt;&lt;code class="cpp comments"&gt;**&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; indicating the external pin wakeup source are automatically&lt;/code&gt;&lt;/p&gt;&lt;p class="index31 alt1 line number32" style="margin:0;"&gt;&lt;code class="cpp comments"&gt;**&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cleared after this event is executed. It is responsibility&lt;/code&gt;&lt;/p&gt;&lt;p class="alt2 index32 number33 line" style="margin:0;"&gt;&lt;code class="cpp comments"&gt;**&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; of user to clear flags corresponding to internal modules.&lt;/code&gt;&lt;/p&gt;&lt;p class="number34 alt1 index33 line" style="margin:0;"&gt;&lt;code class="cpp comments"&gt;**&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; This event is automatically enabled when [LLWU interrupt&lt;/code&gt;&lt;/p&gt;&lt;p class="number35 alt2 line index34" style="margin:0;"&gt;&lt;code class="cpp comments"&gt;**&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; request] is enabled.&lt;/code&gt;&lt;/p&gt;&lt;p class="index35 number36 alt1 line" style="margin:0;"&gt;&lt;code class="cpp comments"&gt;*/&lt;/code&gt;&lt;/p&gt;&lt;p class="index36 number37 alt2 line" style="margin:0;"&gt;&lt;code class="cpp comments"&gt;/* ===================================================================*/&lt;/code&gt;&lt;/p&gt;&lt;p class="number38 index37 alt1 line" style="margin:0;"&gt;&lt;code class="keyword cpp bold"&gt;void&lt;/code&gt; &lt;code class="cpp plain"&gt;Cpu_OnLLSWakeUpINT(&lt;/code&gt;&lt;code class="keyword cpp bold"&gt;void&lt;/code&gt;&lt;code class="cpp plain"&gt;)&lt;/code&gt;&lt;/p&gt;&lt;p class="number39 index38 alt2 line" style="margin:0;"&gt;&lt;code class="cpp plain"&gt;{&lt;/code&gt;&lt;/p&gt;&lt;p class="number40 index39 alt1 line highlighted" style="margin:0;"&gt;&lt;code class="spaces cpp"&gt;&amp;nbsp; &lt;/code&gt;&lt;code class="cpp plain"&gt;APP_OnLLSWakeUpInterrupt();&lt;/code&gt;&lt;/p&gt;&lt;p class="number41 index40 alt2 line" style="margin:0;"&gt;&lt;code class="cpp plain"&gt;}&lt;/code&gt;&lt;/p&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;h1 style="font-family:&amp;#39;Helvetica Neue&amp;#39;, Helvetica, Arial, sans-serif;font-size:15px;font-style:normal;font-weight:bold;margin:0 0 0.8125em;color:#000000;text-align:start;text-indent:0px;"&gt;Summary&lt;/h1&gt;&lt;p style="margin:0;font-family:&amp;#39;Helvetica Neue&amp;#39;, Helvetica, Arial, sans-serif;font-size:15px;font-style:normal;font-weight:300;margin:0 0 1.625em;color:#373737;text-align:start;text-indent:0px;"&gt;This application shows how to set up an application for Low Power LLS mode, in a bare-metal mode. So it should be useful for you if you want to have a starting point for your own project without an RTOS.&lt;/p&gt;&lt;p style="margin:0;font-family:&amp;#39;Helvetica Neue&amp;#39;, Helvetica, Arial, sans-serif;font-size:15px;font-style:normal;font-weight:300;margin:0 0 1.625em;color:#373737;text-align:start;text-indent:0px;"&gt;The project and sources are available on&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;a class="jive-link-external-small" href="https://github.com/ErichStyger/mcuoneclipse/tree/master/Examples/FRDM-KL25Z/FRDM-KL25Z_LowPower_LLS" rel="nofollow ugc noopener" style="font-family:inherit;font-size:15px;font-style:inherit;font-weight:inherit;color:#1982d1;" target="_blank"&gt;GitHub&lt;/a&gt;.&lt;/p&gt;&lt;p style="margin:0;padding:0px;font-family:&amp;#39;Helvetica Neue&amp;#39;, Helvetica, Arial, sans-serif;font-size:15px;font-style:normal;font-weight:300;margin:0 0 1.625em;color:#373737;text-align:start;text-indent:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;span style="color:#ff6600;font-size:10pt;font-family:inherit;font-weight:inherit;"&gt;&lt;em style="text-indent:0px;text-align:start;color:#373737;font-style:normal;font-size:15px;font-family:&amp;#39;Helvetica Neue&amp;#39;, Helvetica, Arial, sans-serif;font-weight:300;"&gt;&lt;br /&gt;&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item></channel></rss>