<?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>Kinetis Software Development Kit中的主题 Re: IRQ Management</title>
    <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/IRQ-Management/m-p/553451#M5686</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi XiangJun,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have send you a « simple project » that duplicates my issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have removed a lot of code related to the PLC stack, but it looks like the&lt;/P&gt;&lt;P&gt;problem&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;still remains. I have deliberately left all the FRDM related code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I&amp;#146;m using a FRDM-K64F board, on Kinetis Design Studio 3.2.0 and SDK 2.0&lt;/P&gt;&lt;P&gt;environment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Running the program, a simple menu will appear &amp;#133;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select choice 2, enter a number of PPDU (for example 5000), plug a scope on&lt;/P&gt;&lt;P&gt;PTB23 and you should see &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;something like next picture. The GPIO associated to PTB23 is toggled each&lt;/P&gt;&lt;P&gt;time the PDB_IRQ_HANDLER()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;function is called. This is how the data are sent on the line. Have a look&lt;/P&gt;&lt;P&gt;at the Frdm_TX() function, you will see,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EnableIRQ(PDB_IRQ_ID) and DisableIRQ(PDB_IRQ_ID) functions calls. It works&lt;/P&gt;&lt;P&gt;fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reset the board, run the program again, and select choice 1, and a number of&lt;/P&gt;&lt;P&gt;PPDU of 500 for example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Plug a scope on PTC9, and you should see next picture. . The GPIO associated&lt;/P&gt;&lt;P&gt;to PTC9 is toggled each time&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; the ADC16_IRQ_HANDLER() function is called.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can select the option 1 more than once, the process is still working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, in the Frdm_RX() function uncomment EnableIRQ(ADC16_IRQ_ID) and&lt;/P&gt;&lt;P&gt;DisableIRQ(ADC16_IRQ_ID) functions calls.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Run the program again, and select choice 1, and a number of PPDU of 500 for&lt;/P&gt;&lt;P&gt;example. Plug a scope on PTC9&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;THE PROBLEM APPEARS here. The second time, you select option 1, the&lt;/P&gt;&lt;P&gt;ADC16_IRQ_HANDLER() function&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is not called anymore.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I&amp;#146;m not able to do the same thing on the receive side as I do on the&lt;/P&gt;&lt;P&gt;transmit side.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help is welcome. Let me know if you need more details.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regard&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nadine,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TALUKO    &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CRE@TVT NUMERIQUE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bâtiment A, 1er étage&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Place Besagne&lt;/P&gt;&lt;P&gt;83000 Toulon&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &amp;lt;http://www.taluko.com&amp;gt; &lt;A href="https://community.nxp.com/www.taluko.com" target="test_blank"&gt;www.taluko.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Tel :     +(33) 4 98 07 74 52&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mobile: +(33) 6 66 27 85 66&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 11 Jul 2016 15:26:16 GMT</pubDate>
    <dc:creator>nadine</dc:creator>
    <dc:date>2016-07-11T15:26:16Z</dc:date>
    <item>
      <title>IRQ Management</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/IRQ-Management/m-p/553449#M5684</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For some time now, I have been working on a software application using a FRDM-K64F board and a specific daughter board on it. This program will mange a PLC stack, and I have harsh real time constraints. The two boards communicate thru electrical wiring.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have asked several questions, and received useful and effective help of the community. &lt;/P&gt;&lt;P&gt;I have configure the DAC (transmit side), the ADC16 (receive side) using interruptions and hardware trigger mechanism (PIT,&amp;nbsp; PDB) to make sure to send /receive data at 1.2 MHz.&lt;/P&gt;&lt;P&gt;And finally, I have a receive and a transmitter operational applications.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But (there is always a but in my email), the problem becomes a little bit more complex when I want to mix the send/receive in the same applications.&lt;/P&gt;&lt;P&gt;On the transmit side, I use the interrupt function of the PDB and I can enable / disable the interrupts using the EnableIRQ/DisableIRQ functions.&lt;/P&gt;&lt;P&gt;On the receive side, I use the interrupt function of the ADC16, and I enable the interrupts using the EnableIRQ function.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;But once I have disable them using the DisableIRQ function, I'm not able to restart them again.&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help, advice is welcome.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;P&gt;Nadine&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Jul 2016 07:59:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/IRQ-Management/m-p/553449#M5684</guid>
      <dc:creator>nadine</dc:creator>
      <dc:date>2016-07-08T07:59:03Z</dc:date>
    </item>
    <item>
      <title>Re: IRQ Management</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/IRQ-Management/m-p/553450#M5685</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Nadine,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I suppose that you use PDB to trigger ADC16, if you use SDK, you can use the following code to enable interrupt.&lt;/P&gt;&lt;P&gt;&amp;nbsp; NVIC_SetPriority(xx,10);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; NVIC_ClearPendingIRQ(xx);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; EnableIRQ(xx); &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here, xx is the interrupt vector number.&lt;/P&gt;&lt;P&gt;If it can not solve your issue, pls develop a simple project which can duplicate your issue if your code is confidential, and tell us the part number and software&amp;nbsp; tools version and attach your project here, so that we can debug on our side.&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;XiangJun Rong&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jul 2016 00:46:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/IRQ-Management/m-p/553450#M5685</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2016-07-11T00:46:06Z</dc:date>
    </item>
    <item>
      <title>Re: IRQ Management</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/IRQ-Management/m-p/553451#M5686</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi XiangJun,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have send you a « simple project » that duplicates my issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have removed a lot of code related to the PLC stack, but it looks like the&lt;/P&gt;&lt;P&gt;problem&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;still remains. I have deliberately left all the FRDM related code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I&amp;#146;m using a FRDM-K64F board, on Kinetis Design Studio 3.2.0 and SDK 2.0&lt;/P&gt;&lt;P&gt;environment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Running the program, a simple menu will appear &amp;#133;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select choice 2, enter a number of PPDU (for example 5000), plug a scope on&lt;/P&gt;&lt;P&gt;PTB23 and you should see &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;something like next picture. The GPIO associated to PTB23 is toggled each&lt;/P&gt;&lt;P&gt;time the PDB_IRQ_HANDLER()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;function is called. This is how the data are sent on the line. Have a look&lt;/P&gt;&lt;P&gt;at the Frdm_TX() function, you will see,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EnableIRQ(PDB_IRQ_ID) and DisableIRQ(PDB_IRQ_ID) functions calls. It works&lt;/P&gt;&lt;P&gt;fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reset the board, run the program again, and select choice 1, and a number of&lt;/P&gt;&lt;P&gt;PPDU of 500 for example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Plug a scope on PTC9, and you should see next picture. . The GPIO associated&lt;/P&gt;&lt;P&gt;to PTC9 is toggled each time&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; the ADC16_IRQ_HANDLER() function is called.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can select the option 1 more than once, the process is still working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, in the Frdm_RX() function uncomment EnableIRQ(ADC16_IRQ_ID) and&lt;/P&gt;&lt;P&gt;DisableIRQ(ADC16_IRQ_ID) functions calls.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Run the program again, and select choice 1, and a number of PPDU of 500 for&lt;/P&gt;&lt;P&gt;example. Plug a scope on PTC9&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;THE PROBLEM APPEARS here. The second time, you select option 1, the&lt;/P&gt;&lt;P&gt;ADC16_IRQ_HANDLER() function&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is not called anymore.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I&amp;#146;m not able to do the same thing on the receive side as I do on the&lt;/P&gt;&lt;P&gt;transmit side.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help is welcome. Let me know if you need more details.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regard&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nadine,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TALUKO    &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CRE@TVT NUMERIQUE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bâtiment A, 1er étage&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Place Besagne&lt;/P&gt;&lt;P&gt;83000 Toulon&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &amp;lt;http://www.taluko.com&amp;gt; &lt;A href="https://community.nxp.com/www.taluko.com" target="test_blank"&gt;www.taluko.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Tel :     +(33) 4 98 07 74 52&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mobile: +(33) 6 66 27 85 66&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jul 2016 15:26:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/IRQ-Management/m-p/553451#M5686</guid>
      <dc:creator>nadine</dc:creator>
      <dc:date>2016-07-11T15:26:16Z</dc:date>
    </item>
    <item>
      <title>Re: IRQ Management</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/IRQ-Management/m-p/553452#M5687</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Nadine,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've not checked deeper your code but it seems to be a Sequence Error on PDB, here is the bit status from PDB registers:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Sequence Error.jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/36456i0C0E089E9E23DD2B/image-size/large?v=v2&amp;amp;px=999" role="button" title="Sequence Error.jpg" alt="Sequence Error.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Please check this note (Section 39.4.1 PDB pre-trigger and trigger outputs):&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="PDB Sequence Error.jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/36405i4F6457A39ACF1983/image-size/large?v=v2&amp;amp;px=999" role="button" title="PDB Sequence Error.jpg" alt="PDB Sequence Error.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And checking your IRQ handlers, you do a lot of stuff in every IRQ handlers (it is recommended to implement shorter IRQ handlers like setting flags, events, etc in order to avoid this issues). Besides, you configured PDB to count "1" Bus cycle in order to generate a new hardware trigger for ADC, so it takes aproximately 1/60MHz to generate a trigger (16nS) for ADC, are you sure that ADC's conversion speed is higher that this value?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Isaac&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jul 2016 16:52:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/IRQ-Management/m-p/553452#M5687</guid>
      <dc:creator>isaacavila</dc:creator>
      <dc:date>2016-07-12T16:52:53Z</dc:date>
    </item>
    <item>
      <title>Re: IRQ Management</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/IRQ-Management/m-p/553453#M5688</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Isaac,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You&amp;#146;re certainly right. I can improve my IRQ handlers functions,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And I will do as you suggest.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But, the point that causes me some confusion, is that&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the program works (enter and leave the ADC16_IRQ_HANDLER() &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;function with no problem using following code. And, the Frdm_RX()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;function can be called several times with no problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void Frdm_RX(int NbPPDU)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;            int32_t NbDone = 0;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;            while (NbDone++ &amp;lt; NbPPDU) {&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                        adc16_buffering = true;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                        adc16IndexBuffer = 1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                        //EnableIRQ(ADC16_IRQ_ID);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                        while (adc16IndexBuffer &amp;gt; 0) { }     /* Frame&lt;/P&gt;&lt;P&gt;buffering - Wait to reach end of buffer */&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                        adc16_buffering = false;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                        //DisableIRQ(ADC16_IRQ_ID);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;            }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then, if I uncomment the two lines &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EnableIRQ(ADC16_IRQ_ID);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DisableIRQ(ADC16_IRQ_ID);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The ADC16_IRQ_HANDLER() is called &amp;#145;NbPPDU&amp;#146; times (validated with 500)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;with no problem. But, only ONE time. Then, the ADC16_IRQ_HANDLER() &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;function is never called again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And finally, if I uncomment the two lines, and add a printf at the end of&lt;/P&gt;&lt;P&gt;the while loop,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The ADC16_IRQ_HANDLER() is called only once.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EnableIRQ(ADC16_IRQ_ID);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DisableIRQ(ADC16_IRQ_ID);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;            printf(&amp;#147;.&amp;#148;);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It looks like, the printf() function, has an uncontrollable effect on my&lt;/P&gt;&lt;P&gt;program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What do do think ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nadine&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TALUKO    &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &amp;lt;mailto:CRE@TVT&amp;gt; CRE@TVT NUMERIQUE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bâtiment A, 1er étage&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Place Besagne&lt;/P&gt;&lt;P&gt;83000 Toulon&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &amp;lt;http://www.taluko.com&amp;gt; &lt;A href="https://community.nxp.com/www.taluko.com" target="test_blank"&gt;www.taluko.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Tel :     +(33) 4 98 07 74 52&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mobile: +(33) 6 66 27 85 66&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jul 2016 11:55:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/IRQ-Management/m-p/553453#M5688</guid>
      <dc:creator>nadine</dc:creator>
      <dc:date>2016-07-13T11:55:09Z</dc:date>
    </item>
    <item>
      <title>Re: IRQ Management</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/IRQ-Management/m-p/553454#M5689</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am unable to execute ADC's handler (no matter if I select 500) when enable IRQ and DisableIRQ are not commented. How did you test it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Isaac&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jul 2016 16:10:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/IRQ-Management/m-p/553454#M5689</guid>
      <dc:creator>isaacavila</dc:creator>
      <dc:date>2016-07-15T16:10:29Z</dc:date>
    </item>
    <item>
      <title>Re: IRQ Management</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/IRQ-Management/m-p/553455#M5690</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Isaac,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is that I can DISABLEIRQ/ENABLEIRQ with no problem, until I&lt;/P&gt;&lt;P&gt;leave the Frdm_RX() function. In fact,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;until the printf function is called. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried to called the Frdm_RX() function several times, without any&lt;/P&gt;&lt;P&gt;printf between the function calls, and it works fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the ADC16_IRQ_HANDLER(), I set a GPIO pin to 0/1 and I use a scope to see&lt;/P&gt;&lt;P&gt;what &amp;#145;s going on in the function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The first time the Frdm_RX() function is called (for NbPPDU=500), here are&lt;/P&gt;&lt;P&gt;the scope results. The function is called at &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;requested frequency (1.2 MHz) with the Enable/Disable IRQ called every&lt;/P&gt;&lt;P&gt;FRAMESIZE (20000) points.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then, as soon as we leave the function, display the main menu, and re-enter&lt;/P&gt;&lt;P&gt;the function &amp;#133; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The ADC16_IRQ_HANDLER() is not called anymore. The GPIO remains high&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nadine,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TALUKO    &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CRE@TVT NUMERIQUE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bâtiment A, 1er étage&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Place Besagne&lt;/P&gt;&lt;P&gt;83000 Toulon&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &amp;lt;http://www.taluko.com&amp;gt; &lt;A href="https://community.nxp.com/www.taluko.com" target="test_blank"&gt;www.taluko.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Tel :     +(33) 4 98 07 74 52&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mobile: +(33) 6 66 27 85 66&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jul 2016 08:15:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/IRQ-Management/m-p/553455#M5690</guid>
      <dc:creator>nadine</dc:creator>
      <dc:date>2016-07-18T08:15:43Z</dc:date>
    </item>
    <item>
      <title>Re: IRQ Management</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/IRQ-Management/m-p/553456#M5691</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have you checked if PDB sequence error is set? maybe PDB error occurs when MCU is printing on console and it avoids ADC_Handler to be called. In my side, I cannot reproduce this issue in my FRDM-K64F but I think that this could be happening due timing issue on PDB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Isaac&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jul 2016 22:42:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/IRQ-Management/m-p/553456#M5691</guid>
      <dc:creator>isaacavila</dc:creator>
      <dc:date>2016-07-26T22:42:05Z</dc:date>
    </item>
  </channel>
</rss>

