<?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 MicrocontrollersのトピックRe: Making a KBI Library...</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Making-a-KBI-Library/m-p/901311#M53060</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi robi what's up?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thnks for you quick answer, I just put that code on the init KBI function, It doens't work yet though, I had read about NVIC (interrupts)&amp;nbsp;in the datasheet, nevertheless it suggest us visit arm website for learn configure NVIC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't get KBI works... :smileysad: Is there something else to be programmed?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks lot!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 21 May 2019 09:05:10 GMT</pubDate>
    <dc:creator>ricardcomas</dc:creator>
    <dc:date>2019-05-21T09:05:10Z</dc:date>
    <item>
      <title>Making a KBI Library...</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Making-a-KBI-Library/m-p/901309#M53058</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everyone and firstly, I woul like say to this communityt THANKS! because of your help, you always helps me! So&lt;/P&gt;&lt;P&gt;In my Jobs we are trying to make a library for use of KBI pheripherial. We know that there's a low level kbi component, and we got&amp;nbsp;that It work&amp;nbsp;successfully, However we want use KBI without add the component, I mean, using low level registers, We got do it! but not all, we have a initialize code (clear kbi flags, init clock for this, edge selection etc...) and we use the PE_ISR macro to specify our interrupt, but it doesn't work!, it works only when add the component and mark "Interrupt" option, just like the image below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Captura.PNG"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/81690i6787D125E88B8108/image-size/large?v=v2&amp;amp;px=999" role="button" title="Captura.PNG" alt="Captura.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;So KBI0 only work (with our code) and checking "Inerrupt resuest: Enabled", but in our code we enable the KBI interrupt in the KBI0_SC register, but doesn't work, we need add the component so that enable that interrupt, why?¿&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is our init code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void initKBI(void){&lt;/P&gt;&lt;P&gt;/* Register 'KBI0_SC' initialization */&lt;BR /&gt; #if KBI0_SC_MASK_1&lt;BR /&gt; #if KBI0_SC_MASK_1 == 0xFFFFFFFF&lt;BR /&gt; KBI0_SC = KBI0_SC_VALUE_1;&lt;BR /&gt; #elif KBI0_SC_MASK_1 == KBI0_SC_VALUE_1&lt;BR /&gt; KBI0_SC |= KBI0_SC_VALUE_1;&lt;BR /&gt; #elif KBI0_SC_VALUE_1 == 0&lt;BR /&gt; KBI0_SC &amp;amp;= ~KBI0_SC_MASK_1;&lt;BR /&gt; #else&lt;BR /&gt; KBI0_SC = (KBI0_SC &amp;amp; (~KBI0_SC_MASK_1)) | KBI0_SC_VALUE_1;&lt;BR /&gt; #endif&lt;BR /&gt; #elif defined(KBI0_SC_VALUE_1)&lt;BR /&gt; KBI0_SC = KBI0_SC_VALUE_1;&lt;BR /&gt; #endif&lt;/P&gt;&lt;P&gt;/* Register 'KBI0_ES' initialization */&lt;BR /&gt; #ifdef KBI0_ES_VALUE&lt;BR /&gt; KBI0_ES = KBI0_ES_VALUE;&lt;BR /&gt; #endif&lt;/P&gt;&lt;P&gt;/* Register 'KBI0_PE' initialization */&lt;BR /&gt; #ifdef KBI0_PE_VALUE&lt;BR /&gt; KBI0_PE = KBI0_PE_VALUE;&lt;BR /&gt; #endif&lt;/P&gt;&lt;P&gt;/* Register 'KBI0_SC' initialization */&lt;BR /&gt; #if KBI0_SC_MASK_2&lt;BR /&gt; #if KBI0_SC_MASK_2 == 0xFFFFFFFF&lt;BR /&gt; KBI0_SC = KBI0_SC_VALUE_2;&lt;BR /&gt; #elif KBI0_SC_MASK_2 == KBI0_SC_VALUE_2&lt;BR /&gt; KBI0_SC |= KBI0_SC_VALUE_2;&lt;BR /&gt; #elif KBI0_SC_VALUE_2 == 0&lt;BR /&gt; KBI0_SC &amp;amp;= ~KBI0_SC_MASK_2;&lt;BR /&gt; #else&lt;BR /&gt; KBI0_SC = (KBI0_SC &amp;amp; (~KBI0_SC_MASK_2)) | KBI0_SC_VALUE_2;&lt;BR /&gt; #endif&lt;BR /&gt; #elif defined(KBI0_SC_VALUE_2)&lt;BR /&gt; KBI0_SC = KBI0_SC_VALUE_2;&lt;BR /&gt; #endif&lt;/P&gt;&lt;P&gt;/* Register 'KBI0_SC' initialization */&lt;BR /&gt; #if KBI0_SC_MASK_3&lt;BR /&gt; #if KBI0_SC_MASK_3 == 0xFFFFFFFF&lt;BR /&gt; KBI0_SC = KBI0_SC_VALUE_3;&lt;BR /&gt; #elif KBI0_SC_MASK_3 == KBI0_SC_VALUE_3&lt;BR /&gt; KBI0_SC |= KBI0_SC_VALUE_3;&lt;BR /&gt; #elif KBI0_SC_VALUE_3 == 0&lt;BR /&gt; KBI0_SC &amp;amp;= ~KBI0_SC_MASK_3;&lt;BR /&gt; #else&lt;BR /&gt; KBI0_SC = (KBI0_SC &amp;amp; (~KBI0_SC_MASK_3)) | KBI0_SC_VALUE_3;&lt;BR /&gt; #endif&lt;BR /&gt; #elif defined(KBI0_SC_VALUE_3)&lt;BR /&gt; KBI0_SC = KBI0_SC_VALUE_3;&lt;BR /&gt; #endif&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 in the header filer:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;void initKBI(void);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;PE_ISR(interruptio);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;and events.c&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;PE_ISR(interrupcio)&lt;BR /&gt;{&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;//Doing something...&lt;/P&gt;&lt;P&gt;KBI0_SC |= KBI_SC_KBACK_MASK; //Clear the flag&lt;BR /&gt;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have we do something else apart of initial code ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 May 2019 13:11:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Making-a-KBI-Library/m-p/901309#M53058</guid>
      <dc:creator>ricardcomas</dc:creator>
      <dc:date>2019-05-20T13:11:23Z</dc:date>
    </item>
    <item>
      <title>Re: Making a KBI Library...</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Making-a-KBI-Library/m-p/901310#M53059</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ricard Comas,&lt;/P&gt;&lt;P&gt;Maybe you forget add these codes:&lt;/P&gt;&lt;P&gt;NVIC setting and clock gate enable&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="NVIC Clock Gate.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/83421i37A1F3903A9A7FD6/image-size/large?v=v2&amp;amp;px=999" role="button" title="NVIC Clock Gate.png" alt="NVIC Clock Gate.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Robin&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 May 2019 08:34:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Making-a-KBI-Library/m-p/901310#M53059</guid>
      <dc:creator>Robin_Shen</dc:creator>
      <dc:date>2019-05-21T08:34:30Z</dc:date>
    </item>
    <item>
      <title>Re: Making a KBI Library...</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Making-a-KBI-Library/m-p/901311#M53060</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi robi what's up?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thnks for you quick answer, I just put that code on the init KBI function, It doens't work yet though, I had read about NVIC (interrupts)&amp;nbsp;in the datasheet, nevertheless it suggest us visit arm website for learn configure NVIC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't get KBI works... :smileysad: Is there something else to be programmed?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks lot!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 May 2019 09:05:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Making-a-KBI-Library/m-p/901311#M53060</guid>
      <dc:creator>ricardcomas</dc:creator>
      <dc:date>2019-05-21T09:05:10Z</dc:date>
    </item>
    <item>
      <title>Re: Making a KBI Library...</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Making-a-KBI-Library/m-p/901312#M53061</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;By the way, I trying to configure PORTA0 for the KBI0&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 May 2019 09:07:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Making-a-KBI-Library/m-p/901312#M53061</guid>
      <dc:creator>ricardcomas</dc:creator>
      <dc:date>2019-05-21T09:07:43Z</dc:date>
    </item>
  </channel>
</rss>

