<?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 Re: Interrupt problem with write buffers in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/Interrupt-problem-with-write-buffers/m-p/755913#M30433</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;/P&gt;&lt;P&gt;Thank you for your feedback, we will check this issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Soledad&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 02 Jan 2018 21:27:36 GMT</pubDate>
    <dc:creator>soledad</dc:creator>
    <dc:date>2018-01-02T21:27:36Z</dc:date>
    <item>
      <title>Interrupt problem with write buffers</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Interrupt-problem-with-write-buffers/m-p/755912#M30432</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;!!! never clear Interruptflags at the last line of interrupt function&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;One time more, i have found that the LPC serie has a big timing problem if clearing interrupt flags .&lt;/P&gt;&lt;P&gt;This problem only occures if you clear the Interrupt flag at the very last line of your interrupt function&lt;/P&gt;&lt;P&gt;and additional you set the compiler optimization to -O3&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The processor needs time to clear the internal interrupt flag, but before the interrupt flag&lt;/P&gt;&lt;P&gt;was cleared we get a next interrupt.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This problem i have found in the LPC1768 and LPC1347&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To solve the problem you need only a litte bit time or you clear the interruptflag&lt;/P&gt;&lt;P&gt;NOT at the very last line.&lt;/P&gt;&lt;P&gt;Now i always put the "DSB" instruction after clearing the interrupt flag in my functions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In my currently project i get a I2C interrupt and the status ist 0xF8&lt;/P&gt;&lt;P&gt;this is an mismatch status and not described in the manual.&lt;/P&gt;&lt;P&gt;i think the error is an result of the internal write buffers of the CPU.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if i use one of the following action it works fine.&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;a) clear interrupt flag NOT at the last line&lt;/LI&gt;&lt;LI&gt;b) do an dummy operation after clearing the interrupt flag&lt;/LI&gt;&lt;LI&gt;c) do not use the compiler optimization&lt;/LI&gt;&lt;LI&gt;d) use an "dsb" instruction after clearing the interrupt flag&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i think this behavior must described in the user manual.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jan 2018 15:15:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Interrupt-problem-with-write-buffers/m-p/755912#M30432</guid>
      <dc:creator>berndsirozynski</dc:creator>
      <dc:date>2018-01-02T15:15:52Z</dc:date>
    </item>
    <item>
      <title>Re: Interrupt problem with write buffers</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Interrupt-problem-with-write-buffers/m-p/755913#M30433</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;/P&gt;&lt;P&gt;Thank you for your feedback, we will check this issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Soledad&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jan 2018 21:27:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Interrupt-problem-with-write-buffers/m-p/755913#M30433</guid>
      <dc:creator>soledad</dc:creator>
      <dc:date>2018-01-02T21:27:36Z</dc:date>
    </item>
  </channel>
</rss>

