<?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中的主题 MKW30Z TSI Stuck Key Detection implementation</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/MKW30Z-TSI-Stuck-Key-Detection-implementation/m-p/646376#M39218</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;KW40Z_Connectivity_Software_1.0.1 (KSDK_1.3.0); IAR 7.50&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;There is some stuck key detection algo implemented in framework ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is the Initial Start-up Calibration witch is a &lt;STRONG&gt;low value calibration&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;Occurs every time the device resets. The first key detection cycle is used as a baseline&lt;/P&gt;&lt;P&gt;capacitance value for all remaining calculations.&lt;BR /&gt;Thus, a touch is detected by taking the difference between this baseline value and a sensitivity value&lt;BR /&gt;compared with current capacitance on the electrode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I guess that the Stuck Key Detection can be a counter (timer) of continuous press events (not interrupted by idle).&lt;BR /&gt;When this value goes above a set value it triggers a recalibration - but should be &lt;STRONG&gt;high value calibration&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Got some inspiration from (pag 24):&lt;BR /&gt;&lt;A href="http://www.nxp.com/assets/documents/data/en/data-sheets/MPR084.pdf"&gt;http://www.nxp.com/assets/documents/data/en/data-sheets/MPR084.pdf&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and tried something like:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #if (gUseStuckButtonCounter_d)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; stuckBtnCnt++;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* trigger recalibration */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (stuckBtnCnt &amp;gt; stuckBtnCntMax)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Calibrate electrode channel - try lower threshold */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(threshold &amp;gt; sensitivity)&amp;nbsp; { threshold = threshold - sensitivity; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else { TsiCalibrate(); }&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; stuckBtnCnt=0;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #endif&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;where threshold is first measured low + sensitivity and the counter fires of about ~5 minutes. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The framework contains a high value calibration demo example ?&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 04 Apr 2017 08:12:17 GMT</pubDate>
    <dc:creator>lucianfiran</dc:creator>
    <dc:date>2017-04-04T08:12:17Z</dc:date>
    <item>
      <title>MKW30Z TSI Stuck Key Detection implementation</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/MKW30Z-TSI-Stuck-Key-Detection-implementation/m-p/646376#M39218</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;KW40Z_Connectivity_Software_1.0.1 (KSDK_1.3.0); IAR 7.50&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;There is some stuck key detection algo implemented in framework ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is the Initial Start-up Calibration witch is a &lt;STRONG&gt;low value calibration&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;Occurs every time the device resets. The first key detection cycle is used as a baseline&lt;/P&gt;&lt;P&gt;capacitance value for all remaining calculations.&lt;BR /&gt;Thus, a touch is detected by taking the difference between this baseline value and a sensitivity value&lt;BR /&gt;compared with current capacitance on the electrode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I guess that the Stuck Key Detection can be a counter (timer) of continuous press events (not interrupted by idle).&lt;BR /&gt;When this value goes above a set value it triggers a recalibration - but should be &lt;STRONG&gt;high value calibration&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Got some inspiration from (pag 24):&lt;BR /&gt;&lt;A href="http://www.nxp.com/assets/documents/data/en/data-sheets/MPR084.pdf"&gt;http://www.nxp.com/assets/documents/data/en/data-sheets/MPR084.pdf&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and tried something like:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #if (gUseStuckButtonCounter_d)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; stuckBtnCnt++;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* trigger recalibration */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (stuckBtnCnt &amp;gt; stuckBtnCntMax)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Calibrate electrode channel - try lower threshold */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(threshold &amp;gt; sensitivity)&amp;nbsp; { threshold = threshold - sensitivity; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else { TsiCalibrate(); }&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; stuckBtnCnt=0;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #endif&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;where threshold is first measured low + sensitivity and the counter fires of about ~5 minutes. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The framework contains a high value calibration demo example ?&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Apr 2017 08:12:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/MKW30Z-TSI-Stuck-Key-Detection-implementation/m-p/646376#M39218</guid>
      <dc:creator>lucianfiran</dc:creator>
      <dc:date>2017-04-04T08:12:17Z</dc:date>
    </item>
    <item>
      <title>Re: MKW30Z TSI Stuck Key Detection implementation</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/MKW30Z-TSI-Stuck-Key-Detection-implementation/m-p/646377#M39219</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Lucian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As far as I know, the Connectivity Framework for KW40Z doesn’t implement TSI functionality.&lt;/P&gt;&lt;P&gt;Have you looked at the &lt;A href="http://cache.freescale.com/files/32bit/doc/quick_ref_guide/KQRUG.pdf"&gt;Kinetis Peripheral Module Quick Reference&lt;/A&gt;? There is a chapter about the TSI module with useful reference material on how to implement the TSI module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt; Gerardo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Apr 2017 00:00:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/MKW30Z-TSI-Stuck-Key-Detection-implementation/m-p/646377#M39219</guid>
      <dc:creator>gerardo_rodriguez</dc:creator>
      <dc:date>2017-04-27T00:00:37Z</dc:date>
    </item>
  </channel>
</rss>

