<?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 Call-back Functions for MQX Idle Task and SysTick in MQX Software Solutions</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/Call-back-Functions-for-MQX-Idle-Task-and-SysTick/m-p/207120#M4929</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think it could be very usefull for a MQX-based application to have a user call-back function available both for the Idle Task and the SysTick timer interrupt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With a call-back function (hook function), called during each cycle of the Idle Task, the application could execute some lowest-priority processes (it is common to use the idle hook function to place the microcontroller CPU into a power saving mode or just to calculate the CPU time).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the same way, a SysTick hook function, called from the MQX tick timer interrupt, could provide a convenient place to implement timer functionalities with SysTick resolution.&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;What do you think about it?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 03 Oct 2012 07:51:34 GMT</pubDate>
    <dc:creator>Vagni</dc:creator>
    <dc:date>2012-10-03T07:51:34Z</dc:date>
    <item>
      <title>Call-back Functions for MQX Idle Task and SysTick</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Call-back-Functions-for-MQX-Idle-Task-and-SysTick/m-p/207120#M4929</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think it could be very usefull for a MQX-based application to have a user call-back function available both for the Idle Task and the SysTick timer interrupt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With a call-back function (hook function), called during each cycle of the Idle Task, the application could execute some lowest-priority processes (it is common to use the idle hook function to place the microcontroller CPU into a power saving mode or just to calculate the CPU time).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the same way, a SysTick hook function, called from the MQX tick timer interrupt, could provide a convenient place to implement timer functionalities with SysTick resolution.&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;What do you think about it?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Oct 2012 07:51:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Call-back-Functions-for-MQX-Idle-Task-and-SysTick/m-p/207120#M4929</guid>
      <dc:creator>Vagni</dc:creator>
      <dc:date>2012-10-03T07:51:34Z</dc:date>
    </item>
    <item>
      <title>Re: Call-back Functions for MQX Idle Task and SysTick</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Call-back-Functions-for-MQX-Idle-Task-and-SysTick/m-p/207121#M4930</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alessandro,&lt;BR /&gt;actually both are already implemented into MQX:&lt;BR /&gt;1)idletask calculates idle time.&lt;BR /&gt;&amp;nbsp; Found in PSP Generic-&amp;gt;kernel-&amp;gt;idletask.c.&lt;BR /&gt;&amp;nbsp; Unfortunatelly IDLE_LOOPx variables are not visible to application tasks.&lt;BR /&gt;&amp;nbsp; I created an extra function into PSP to return those (in MQX3.8).&lt;BR /&gt;&amp;nbsp; How MQX team has designed to use IDLE_LOOPx-variables?&lt;/P&gt;&lt;P&gt;2)lwtimer can be used for tick based timer functions.&lt;BR /&gt;&amp;nbsp; Found in PSP Generic-&amp;gt;lwtimer.&lt;BR /&gt;&amp;nbsp; In one earlier project I changed tick to 1ms and created lw-timer for that 1 ms. Worked fine.&lt;BR /&gt;&amp;nbsp; Kernel calls lwtimer-"ISR" from PSP Generic-&amp;gt;kernel-&amp;gt;ti_krnl.c &lt;BR /&gt;&amp;nbsp; at function _time_notify_kernel():&lt;BR /&gt;&amp;nbsp; #if MQX_USE_LWTIMER&lt;BR /&gt;&amp;nbsp;&amp;nbsp; /* If the lwtimer needs servicing, call its ISR function */&lt;BR /&gt;&amp;nbsp;&amp;nbsp; if (kernel_data-&amp;gt;LWTIMER_ISR != NULL) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (*kernel_data-&amp;gt;LWTIMER_ISR)();&lt;BR /&gt;&amp;nbsp;&amp;nbsp; }/* Endif */&lt;BR /&gt;&amp;nbsp; #endif&lt;/P&gt;&lt;P&gt;~Mark&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Oct 2012 16:01:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Call-back-Functions-for-MQX-Idle-Task-and-SysTick/m-p/207121#M4930</guid>
      <dc:creator>MarkP_</dc:creator>
      <dc:date>2012-10-03T16:01:14Z</dc:date>
    </item>
  </channel>
</rss>

