<?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: Timer interrupt callback not being called</title>
    <link>https://community.nxp.com/t5/Wireless-MCU/Timer-interrupt-callback-not-being-called/m-p/798759#M5097</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;EM&gt;May I ask if there's anything else needs to be configured in order for the timer (or PWM) to work? Also, is there a need to edit the ISR file&amp;nbsp;irq_JN516x.S?&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Yes you need to set up the priority to the timer that you are using&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;.byte 0 # timer1 priority&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;.word vISR_Timer1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # 13&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mario&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 04 Dec 2018 23:46:12 GMT</pubDate>
    <dc:creator>mario_castaneda</dc:creator>
    <dc:date>2018-12-04T23:46:12Z</dc:date>
    <item>
      <title>Timer interrupt callback not being called</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/Timer-interrupt-callback-not-being-called/m-p/798758#M5096</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using JN5168, JN-AN-1218-Zigbee-3-0-Light-Bulb as a baseline code for a lighting control application.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my code, I have implemented a PWM using Timer 1 with interrupt. However, when I tried to run the code, the interrupt callback function is not being called. Here's my code for the PWM initialization:&lt;/P&gt;&lt;PRE class="language-c line-numbers"&gt;&lt;CODE&gt;PRIVATE &lt;SPAN class="keyword token"&gt;void&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;DriverBulb_vInit&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;void&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="comment token"&gt;// Enable period interrupt generation and PWM output&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="token function"&gt;vAHI_TimerEnable&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;E_AHI_TIMER_1&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; FALSE&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; TRUE&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; TRUE&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="comment token"&gt;// Register interrupt callback&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="token function"&gt;vAHI_Timer1RegisterCallback&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;vISR_DriverBulbTimer&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="comment token"&gt;// Start Timer1 as single-shot mode&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="token function"&gt;vAHI_TimerStartSingleShot&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;E_AHI_TIMER_1&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;11&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;10&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;

&lt;SPAN class="keyword token"&gt;void&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;vISR_DriverBulbTimer&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;uint32 u32DeviceId&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; uint32 u32ItemBitmap&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;u32DeviceId &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; E_AHI_DEVICE_TIMER1&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;&amp;amp;&amp;amp;&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;u32ItemBitmap &lt;SPAN class="operator token"&gt;&amp;amp;&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0x01&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="token function"&gt;DBG_vPrintf&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;TRUE&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"ISR Called\n"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;May I ask if there's anything else needs to be configured in order for the timer (or pwm) to work? Also, is there a need to edit the ISR file &lt;EM&gt;irq_JN516x.S&lt;/EM&gt;?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance for your help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jul 2018 06:01:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/Timer-interrupt-callback-not-being-called/m-p/798758#M5096</guid>
      <dc:creator>weifoong_lim</dc:creator>
      <dc:date>2018-07-31T06:01:05Z</dc:date>
    </item>
    <item>
      <title>Re: Timer interrupt callback not being called</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/Timer-interrupt-callback-not-being-called/m-p/798759#M5097</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;EM&gt;May I ask if there's anything else needs to be configured in order for the timer (or PWM) to work? Also, is there a need to edit the ISR file&amp;nbsp;irq_JN516x.S?&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Yes you need to set up the priority to the timer that you are using&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;.byte 0 # timer1 priority&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;.word vISR_Timer1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # 13&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mario&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Dec 2018 23:46:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/Timer-interrupt-callback-not-being-called/m-p/798759#M5097</guid>
      <dc:creator>mario_castaneda</dc:creator>
      <dc:date>2018-12-04T23:46:12Z</dc:date>
    </item>
  </channel>
</rss>

