<?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>Wireless MCUのトピックRe: PWRM_eScheduleActivity() could not schedule tasks</title>
    <link>https://community.nxp.com/t5/Wireless-MCU/PWRM-eScheduleActivity-could-not-schedule-tasks/m-p/688823#M3283</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Eric,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you trying to use wake events? Are you using the&amp;nbsp;Wake Timer 1?&lt;/P&gt;&lt;P&gt;Your interrupt handler must call the pre-defined callback function PWRM_WakeInterruptCallback(). This function maintains the list of scheduled wake events - if required, it will re-start the wake timer for the next wake point.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The function PWRM_eScheduleActivity will return an error &amp;nbsp;if the 32-kHz oscillator has not been configured to run during sleep or the software wake timer is already running for another wake point.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Mario&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 14 Aug 2017 16:06:18 GMT</pubDate>
    <dc:creator>mario_castaneda</dc:creator>
    <dc:date>2017-08-14T16:06:18Z</dc:date>
    <item>
      <title>PWRM_eScheduleActivity() could not schedule tasks</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/PWRM-eScheduleActivity-could-not-schedule-tasks/m-p/688822#M3282</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, we are using JN5169 with JN-SW4168 on developing Zigbee end-device product(non RX Idle).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The&amp;nbsp;PWRM_eScheduleActivity() is used on various tasks scheduling like calling&amp;nbsp;ZPS_eAplZdoPoll() at interval and some others.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is found that after running for some days, the &lt;SPAN&gt;PWRM_eScheduleActivity() could not scheduling the task any more, it always return the status&amp;nbsp;PWRM_E_TIMER_RUNNING, and the target call back function could not be scheduled any more.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Any idea on this?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Aug 2017 02:22:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/PWRM-eScheduleActivity-could-not-schedule-tasks/m-p/688822#M3282</guid>
      <dc:creator>erictao</dc:creator>
      <dc:date>2017-08-01T02:22:32Z</dc:date>
    </item>
    <item>
      <title>Re: PWRM_eScheduleActivity() could not schedule tasks</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/PWRM-eScheduleActivity-could-not-schedule-tasks/m-p/688823#M3283</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Eric,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you trying to use wake events? Are you using the&amp;nbsp;Wake Timer 1?&lt;/P&gt;&lt;P&gt;Your interrupt handler must call the pre-defined callback function PWRM_WakeInterruptCallback(). This function maintains the list of scheduled wake events - if required, it will re-start the wake timer for the next wake point.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The function PWRM_eScheduleActivity will return an error &amp;nbsp;if the 32-kHz oscillator has not been configured to run during sleep or the software wake timer is already running for another wake point.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Mario&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Aug 2017 16:06:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/PWRM-eScheduleActivity-could-not-schedule-tasks/m-p/688823#M3283</guid>
      <dc:creator>mario_castaneda</dc:creator>
      <dc:date>2017-08-14T16:06:18Z</dc:date>
    </item>
    <item>
      <title>Re: PWRM_eScheduleActivity() could not schedule tasks</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/PWRM-eScheduleActivity-could-not-schedule-tasks/m-p/688824#M3284</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Mario:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot for the info and sorry for the late reply/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, I think am using wake event; and wake timer 1 is used.(As I remember, JN5169 has exactly 2 wake timer2; timer 0 is used for IEEE802.15.4 stack, and timer 1 is used by JenOS)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the interrupt handler, it is implemented by JenOS, which would call the used defined&amp;nbsp;PWRM_CALLBACK(Wakeup) function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And an update, it looks like to be some initialization procedure in the PWRM_CALLBACK(wakeup) that caused the issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the details:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following code snip would have the issue:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;PWRM_CALLBACK(Wakeup) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;DBG_vInit();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;UART_vInit();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;PWRM_eScheduleActivity(&amp;amp;sWake_fast, 20000, vWakeDataRequest);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;OS_vRestart();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;While the following looks to be solved the issue(at least it is not&amp;nbsp;reproduced for several weeks, compare to several days previously )&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;PWRM_CALLBACK(Wakeup)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;DBG_vInit();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;UART_vInit();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;OS_vRestart();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;PWRM_eScheduleActivity(&amp;amp;sWake_fast, 20000, vWakeDataRequest);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;So in summary, if calling PWRM_eScheduleActive() before OS_vRestart() in PWRM wake up callback, there would be some issue.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Does it make sense? .e.g: some interval implementation....&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Sep 2017 15:40:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/PWRM-eScheduleActivity-could-not-schedule-tasks/m-p/688824#M3284</guid>
      <dc:creator>erictao</dc:creator>
      <dc:date>2017-09-04T15:40:38Z</dc:date>
    </item>
    <item>
      <title>Re: PWRM_eScheduleActivity() could not schedule tasks</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/PWRM-eScheduleActivity-could-not-schedule-tasks/m-p/688825#M3285</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Eric,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The OS_vRestart()&amp;nbsp;is used to restart the RTOS following a warm start with memory held. The function re-initiates the interrupt hardware.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The scheduling wake events is applicable when the memory is held.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Mario&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Sep 2017 02:52:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/PWRM-eScheduleActivity-could-not-schedule-tasks/m-p/688825#M3285</guid>
      <dc:creator>mario_castaneda</dc:creator>
      <dc:date>2017-09-14T02:52:32Z</dc:date>
    </item>
  </channel>
</rss>

