<?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: Re: Change Mode in GENCS (TSI) problem in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Change-Mode-in-GENCS-TSI-problem/m-p/333238#M15744</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kan, &lt;/P&gt;&lt;P&gt;I've tried to read the noise through the TSI_GENCS[MODE] and its always null. As you wrote I can easily see noise if I touch the pad. So, it still stays null. again please provide an example on the evaluation board that shows the correct handling of the noise. &lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Michael David.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 28 Sep 2014 10:30:24 GMT</pubDate>
    <dc:creator>MichaelDavid</dc:creator>
    <dc:date>2014-09-28T10:30:24Z</dc:date>
    <item>
      <title>Change Mode in GENCS (TSI) problem</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Change-Mode-in-GENCS-TSI-problem/m-p/333229#M15735</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm working with kinetis KL05Z32&lt;/P&gt;&lt;P&gt;I'm trying to change the mode in GENCS register (TSI), but it stays 0.&lt;/P&gt;&lt;P&gt;here is the code(CW10.3):&lt;/P&gt;&lt;P&gt;// clear register relevant bits&lt;/P&gt;&lt;P&gt;&amp;nbsp; TSI0_GENCS &amp;amp;= ~(uint32_t)(TSI_GENCS_MODE_MASK|&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TSI_GENCS_DVOLT_MASK |&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TSI_GENCS_EXTCHRG_MASK |&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TSI_GENCS_TSIEN_MASK);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; TSI0_GENCS |= (TSI_GENCS_MODE(0x4)| // noise sensing single&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TSI_GENCS_DVOLT(3) | // DVpm = 1.350V (DVOLT&amp;lt;1:0&amp;gt;,EXTCHRG&amp;lt;2:1&amp;gt; = 1110b)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TSI_GENCS_EXTCHRG(4));&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Sep 2014 14:24:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Change-Mode-in-GENCS-TSI-problem/m-p/333229#M15735</guid>
      <dc:creator>MichaelDavid</dc:creator>
      <dc:date>2014-09-02T14:24:58Z</dc:date>
    </item>
    <item>
      <title>Re: Change Mode in GENCS (TSI) problem</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Change-Mode-in-GENCS-TSI-problem/m-p/333230#M15736</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Michael,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did you debug your code on FRDM-KL05? What is the IDE you are using? Is it possible to send your project for a review? Thanks for your patience!&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;B.R&lt;BR /&gt;Kan&lt;/P&gt;&lt;P&gt;&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>Wed, 03 Sep 2014 03:08:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Change-Mode-in-GENCS-TSI-problem/m-p/333230#M15736</guid>
      <dc:creator>Kan_Li</dc:creator>
      <dc:date>2014-09-03T03:08:12Z</dc:date>
    </item>
    <item>
      <title>Re: Change Mode in GENCS (TSI) problem</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Change-Mode-in-GENCS-TSI-problem/m-p/333231#M15737</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kan,&lt;/P&gt;&lt;P&gt;I'm working on our custom board. IDE - CW10.3 eclipse version. I'll write a simple program on the FRDM board so you can check it also.&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Michael David.&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Sep 2014 09:27:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Change-Mode-in-GENCS-TSI-problem/m-p/333231#M15737</guid>
      <dc:creator>MichaelDavid</dc:creator>
      <dc:date>2014-09-04T09:27:38Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Change Mode in GENCS (TSI) problem</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Change-Mode-in-GENCS-TSI-problem/m-p/333232#M15738</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kan,&lt;/P&gt;&lt;P&gt;Attached is a simple example, based on the LED_Blink, with a initiation to the TSI only to check if the mode changes in the GENCS.&lt;/P&gt;&lt;P&gt;The IDE that I've worked with are CW10.3 and CW10.6, checked on FRDM-KL05. (example name is build/cw/LED_Blink_TSI)&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Michael David.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Sep 2014 16:23:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Change-Mode-in-GENCS-TSI-problem/m-p/333232#M15738</guid>
      <dc:creator>MichaelDavid</dc:creator>
      <dc:date>2014-09-04T16:23:26Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Change Mode in GENCS (TSI) problem</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Change-Mode-in-GENCS-TSI-problem/m-p/333233#M15739</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Michael,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry for the late response, my laptop got broken down and I just reinstalled it. For your example project, it works well on my FRDM-KL05Z, but I can see TSI0_GENCS is set with non-zero value,&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/45584i859E4DE2B6D73D7A/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.png" alt="1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;so I am wondering if you want to change this register on the fly? but actually, RM states "&lt;/P&gt;&lt;P&gt;When TSI is working, the configuration bits (GENCS[TSIEN],&lt;/P&gt;&lt;P&gt;GENCS[TSIIEN], and GENCS[STM]) must not be changed.&lt;/P&gt;&lt;P&gt;The EOSF flag is kept until the software acknowledge it.&lt;/P&gt;&lt;P&gt;"&lt;/P&gt;&lt;P&gt;so if you want to change TSI0_GENCS when TSI is working, you have to wait for the end of scan by polling EOSF flag.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Kan&lt;/P&gt;&lt;P&gt;&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, 09 Sep 2014 06:15:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Change-Mode-in-GENCS-TSI-problem/m-p/333233#M15739</guid>
      <dc:creator>Kan_Li</dc:creator>
      <dc:date>2014-09-09T06:15:32Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Change Mode in GENCS (TSI) problem</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Change-Mode-in-GENCS-TSI-problem/m-p/333234#M15740</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kan,&lt;/P&gt;&lt;P&gt;As you can see even from your screen shut, the Mode bits in GENCS (24-27) stays 0, the other bits can be changed. these bit always stays null.&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Michael David. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Sep 2014 11:58:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Change-Mode-in-GENCS-TSI-problem/m-p/333234#M15740</guid>
      <dc:creator>MichaelDavid</dc:creator>
      <dc:date>2014-09-09T11:58:02Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Change Mode in GENCS (TSI) problem</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Change-Mode-in-GENCS-TSI-problem/m-p/333235#M15741</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Michael ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I just got the feedback, please refer to the following for details.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Verdana','sans-serif'; color: #984806;"&gt;There must be noise coupled to the TSI active channels and then TSI will signalize the noise level to 4bit number and return back to TSI_GENCS[MODE] for user to read. If TSI is working in a very peace environment the TSI_GENCS[MODE] will be read back as zero.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Verdana','sans-serif'; color: #984806;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Verdana','sans-serif'; color: #984806;"&gt;Hope that helps,&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Kan&lt;/P&gt;&lt;P&gt;&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>Wed, 17 Sep 2014 09:26:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Change-Mode-in-GENCS-TSI-problem/m-p/333235#M15741</guid>
      <dc:creator>Kan_Li</dc:creator>
      <dc:date>2014-09-17T09:26:42Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Change Mode in GENCS (TSI) problem</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Change-Mode-in-GENCS-TSI-problem/m-p/333236#M15742</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kan,&lt;/P&gt;&lt;P&gt;Can you provide a simple provide simple code to clarify this procedure. because as I understand I should read the mode bits to get the noise?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2014 10:32:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Change-Mode-in-GENCS-TSI-problem/m-p/333236#M15742</guid>
      <dc:creator>MichaelDavid</dc:creator>
      <dc:date>2014-09-17T10:32:17Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Change Mode in GENCS (TSI) problem</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Change-Mode-in-GENCS-TSI-problem/m-p/333237#M15743</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Michael,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Shall we know your application? And what is the difficulty you meet?&lt;/P&gt;&lt;P&gt;The read back value is only useful under noise mode. Noise mode is used/works only under noisy environment. It can detect touch even by using noise itself.&lt;/P&gt;&lt;P&gt;Under noisy environment, if no touch, the callback will be 0 or 1; when touch, the callback may be A ～ F. This difference can be used to detect a touch.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Normally, cap mode and noise mode can be combined together by SW for a robust solution.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Kan&lt;/P&gt;&lt;P&gt;&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>Mon, 22 Sep 2014 02:54:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Change-Mode-in-GENCS-TSI-problem/m-p/333237#M15743</guid>
      <dc:creator>Kan_Li</dc:creator>
      <dc:date>2014-09-22T02:54:54Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Change Mode in GENCS (TSI) problem</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Change-Mode-in-GENCS-TSI-problem/m-p/333238#M15744</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kan, &lt;/P&gt;&lt;P&gt;I've tried to read the noise through the TSI_GENCS[MODE] and its always null. As you wrote I can easily see noise if I touch the pad. So, it still stays null. again please provide an example on the evaluation board that shows the correct handling of the noise. &lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Michael David.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 28 Sep 2014 10:30:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Change-Mode-in-GENCS-TSI-problem/m-p/333238#M15744</guid>
      <dc:creator>MichaelDavid</dc:creator>
      <dc:date>2014-09-28T10:30:24Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Change Mode in GENCS (TSI) problem</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Change-Mode-in-GENCS-TSI-problem/m-p/333239#M15745</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Michael,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe there is some misunderstanding. TSI_GENCS[MODE] functional under noisy environment, so would you please help to check if the read back value is non-zero when &lt;STRONG&gt;no touch&lt;/STRONG&gt;? if yes, it means there is noise around the device, then you may read a different non-zero value when touch.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Kan&lt;/P&gt;&lt;P&gt;&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>Mon, 29 Sep 2014 04:55:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Change-Mode-in-GENCS-TSI-problem/m-p/333239#M15745</guid>
      <dc:creator>Kan_Li</dc:creator>
      <dc:date>2014-09-29T04:55:47Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Change Mode in GENCS (TSI) problem</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Change-Mode-in-GENCS-TSI-problem/m-p/333240#M15746</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Michael,&lt;/P&gt;&lt;P&gt;I've receive the reply about the TSI_GENCS[MODE] verification from the AE team and the detail information as follows, please refer to it for details.&lt;/P&gt;&lt;OL style="list-style-type: decimal;"&gt;&lt;LI&gt;&lt;SPAN style="font-size: 12.0pt; color: #1f497d;"&gt;About noise generating&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; color: #1f497d;"&gt;KL noise detection mode is used especially for IEC61000-4-6 test, in which the noise (range from 150KHz to 230MHz) is injected into 220V AC power supply, other than from the touch pad.&lt;/SPAN&gt;&lt;/P&gt;&lt;OL style="list-style-type: decimal;"&gt;&lt;LI&gt;&lt;SPAN style="font-size: 12.0pt; color: #1f497d;"&gt;How to verify TSI_GENCS[MODE]&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; color: #1f497d;"&gt;Set MODE[3:2] = 0b11, and inject noise into power supply, then read MODE bits, the MODE[3:0] is the noise level (value ranges 0-15), which is proportional to the noise injected.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; color: #1f497d;"&gt;Attached below is the example code:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="color: #1f497d; font-size: 10.0pt;"&gt;//Measure TSI channel noise level value in noise mode&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="color: #1f497d; font-size: 10.0pt;"&gt;void tsi_measure_noise(unsigned char uChN)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="color: #1f497d; font-size: 10.0pt;"&gt;{&lt;/EM&gt;&lt;/P&gt;&lt;P style="text-indent: 12.0pt;"&gt;&lt;EM style="color: #1f497d; font-size: 10.0pt;"&gt;//enable noise mode&lt;/EM&gt;&lt;/P&gt;&lt;P style="text-indent: 12.0pt;"&gt;&lt;EM style="color: #1f497d; font-size: 10.0pt;"&gt;TSI0_GENCS |= (TSI_GENCS_ESOR_MASK&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="color: #1f497d; font-size: 10.0pt;"&gt; | TSI_GENCS_MODE(12u) // auto noise detection&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="color: #1f497d; font-size: 10.0pt;"&gt; | TSI_GENCS_DVOLT(0) // select voltage rails&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="color: #1f497d; font-size: 10.0pt;"&gt; | TSI_GENCS_EXTCHRG(0) // use 32Kohm Rs, no filter &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="color: #1f497d; font-size: 10.0pt;"&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; | TSI_GENCS_REFCHRG(Iref0p5u) &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="color: #1f497d; font-size: 10.0pt;"&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; | TSI_GENCS_PS(3)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="color: #1f497d; font-size: 10.0pt;"&gt; | TSI_GENCS_NSCN(16)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="color: #1f497d; font-size: 10.0pt;"&gt; );&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="color: #1f497d; font-size: 10.0pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //start channel scan&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="color: #1f497d; font-size: 10.0pt;"&gt; TSI0_DATA &amp;amp;=&amp;nbsp; ~TSI_DATA_TSICH(0xF);&amp;nbsp;&amp;nbsp;&amp;nbsp; // clear channels&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="color: #1f497d; font-size: 10.0pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; TSI0_DATA |= TSI_DATA_TSICH(uChN);&amp;nbsp;&amp;nbsp;&amp;nbsp; // set channel ID&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="color: #1f497d; font-size: 10.0pt;"&gt; TSI0_DATA |= TSI_DATA_SWTS_MASK;&amp;nbsp;&amp;nbsp;&amp;nbsp; // start sampling&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="color: #1f497d; font-size: 10.0pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // wait for sampling done&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="color: #1f497d; font-size: 10.0pt;"&gt; while (!(TSI0_GENCS &amp;amp; TSI_GENCS_EOSF_MASK)); &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="color: #1f497d; font-size: 10.0pt;"&gt; // read noise level&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="color: #1f497d; font-size: 10.0pt;"&gt; uNoiseLevel[uChN] = (uint16_t)((TSI0_GENCS &amp;amp; TSI_GENCS_MODE_MASK) &amp;gt;&amp;gt; TSI_GENCS_MODE_SHIFT);&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="color: #1f497d; font-size: 10.0pt;"&gt; // clear the flag&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="color: #1f497d; font-size: 10.0pt;"&gt; TSI0_GENCS |= TSI_GENCS_EOSF_MASK;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="color: #1f497d; font-size: 10.0pt;"&gt;}&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; color: #1f497d;"&gt; For more details, please refer to KL05 Reference Manual “Automatic noise mode”.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Ping&lt;/P&gt;&lt;P&gt;&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, 30 Sep 2014 07:02:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Change-Mode-in-GENCS-TSI-problem/m-p/333240#M15746</guid>
      <dc:creator>jeremyzhou</dc:creator>
      <dc:date>2014-09-30T07:02:39Z</dc:date>
    </item>
  </channel>
</rss>

