<?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: Kbi Interrupt on MCF51JM doesnt work as expected in ColdFire/68K Microcontrollers and Processors</title>
    <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Kbi-Interrupt-on-MCF51JM-doesnt-work-as-expected/m-p/241036#M11418</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have a look at 'Figure 9-2. Port Interrupt Block Diagram" in the Reference Manual. That explains how it is wired.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is a KEYBOARD input port, so it is only meant for detecting single edges on one of the input pins at a time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To do what you want there are two choices - flip the polarity like you're doing or disable that pin with the KBIPEn bit. The problem there is that you probably want to re-enable the interrupt when the pin changes state again, and the easiest way to do that is to do what you're doing - flip the edge.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you get two pins changing close together you'll have to have some pretty smart code so it doesn't lock up or lose interrupts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the pins aren't changing all that often (and if you don't need microsecond-level timing) it might be simpler to just poll the pins from a timer interrupt or from your main event loop and detect changes in software.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you do want fully independent interrupt capability and nanosecond-level timing you're better off using the TPM to capture the input times and generate interrupts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 26 Mar 2013 23:19:40 GMT</pubDate>
    <dc:creator>TomE</dc:creator>
    <dc:date>2013-03-26T23:19:40Z</dc:date>
    <item>
      <title>Kbi Interrupt on MCF51JM doesnt work as expected</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Kbi-Interrupt-on-MCF51JM-doesnt-work-as-expected/m-p/241035#M11417</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;I am trying to detect falling edges on input kbi pins.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Problem is, that once one falling edge is detected, second edge detection on another pin (also kbi enabled) does not work and interrupt get missed..&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;If there is only one pin low at time then each interrupt on any pin is correctly detected, and processed.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My solution is now that once interrupt happens, i change value of&amp;nbsp; KBI1 Interrupt Edge Select Register (KBI1ES),&amp;nbsp; This way any change on any pin always raises interrupt (falling or raising edge)&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since this looks more like hack that solution, can somebody tell me if i am doing something wrong and if my findings are correct.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Luka&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Mar 2013 12:11:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Kbi-Interrupt-on-MCF51JM-doesnt-work-as-expected/m-p/241035#M11417</guid>
      <dc:creator>ralu</dc:creator>
      <dc:date>2013-03-26T12:11:51Z</dc:date>
    </item>
    <item>
      <title>Re: Kbi Interrupt on MCF51JM doesnt work as expected</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Kbi-Interrupt-on-MCF51JM-doesnt-work-as-expected/m-p/241036#M11418</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have a look at 'Figure 9-2. Port Interrupt Block Diagram" in the Reference Manual. That explains how it is wired.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is a KEYBOARD input port, so it is only meant for detecting single edges on one of the input pins at a time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To do what you want there are two choices - flip the polarity like you're doing or disable that pin with the KBIPEn bit. The problem there is that you probably want to re-enable the interrupt when the pin changes state again, and the easiest way to do that is to do what you're doing - flip the edge.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you get two pins changing close together you'll have to have some pretty smart code so it doesn't lock up or lose interrupts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the pins aren't changing all that often (and if you don't need microsecond-level timing) it might be simpler to just poll the pins from a timer interrupt or from your main event loop and detect changes in software.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you do want fully independent interrupt capability and nanosecond-level timing you're better off using the TPM to capture the input times and generate interrupts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Mar 2013 23:19:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Kbi-Interrupt-on-MCF51JM-doesnt-work-as-expected/m-p/241036#M11418</guid>
      <dc:creator>TomE</dc:creator>
      <dc:date>2013-03-26T23:19:40Z</dc:date>
    </item>
  </channel>
</rss>

