<?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: Using NMI as ADC in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Using-NMI-as-ADC/m-p/1167355#M58494</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN&gt;asapuntz,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;1. If you don't want to use the NMI, you can disable it by&amp;nbsp;FOPT[NMI_DIS] = 0&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; 2. You need to PORTD_PCR3[MUX] = 0&amp;nbsp;PORTD_PCR3[PE]=0, for the ADC function.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; 3. I think the analog mode 0 , you can disable the pull configuration if you really don't want to use it.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; 4.&amp;nbsp;&amp;nbsp;set FOPT[BOOTPIN_OPT] = 1 and FOPT[BOOTSRC_SEL] = 01 is OK&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Wish it helps you!&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If you still have questions about it, please kindly let me know!&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best Regards,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Kerry&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;-------------------------------------------------------------------------------&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Note:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;- If this post answers your question, please click the "Mark Correct" button. Thank you!&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;- We are following threads for 7 weeks after the last post, later replies are ignored&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Please open a new thread and refer to the closed one, if you have a related question at a later point in time.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;-----------------------------------------------------------------------------&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 14 Oct 2020 09:27:40 GMT</pubDate>
    <dc:creator>kerryzhou</dc:creator>
    <dc:date>2020-10-14T09:27:40Z</dc:date>
    <item>
      <title>Using NMI as ADC</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Using-NMI-as-ADC/m-p/1167001#M58485</link>
      <description>&lt;P&gt;KE18F 64-pin package&lt;/P&gt;&lt;P&gt;Per RM 34.2.2 Pin Properties, 45/D3 defaults to NMI with pull-up after POR.&lt;/P&gt;&lt;P&gt;It can also function as BOOTCFG0 as well as ADC1_SE3 (among others)&lt;/P&gt;&lt;P&gt;Setting FOPT[NMI_DIS] = 0 should disable NMI interrupts.&lt;/P&gt;&lt;P&gt;I assume I still need to change PORTD_PCR3[MUX] = 0 to select the ADC function.&lt;/P&gt;&lt;P&gt;Should I do anything with&amp;nbsp;PORTD_PCR3[PE]?&lt;/P&gt;&lt;P&gt;I don't want the pull-up interfering with the SAR ADC input filter.&lt;/P&gt;&lt;P&gt;However, I also don't want to risk booting from ROM (BOOTCFG0 low) for reset types other than POR.&lt;/P&gt;&lt;P&gt;Per 35.6.1, "Pull configuration is valid in all digital pin muxing modes". Does that mean it should be disabled for ALT0/analog, or is it irrelevant? &lt;STRIKE&gt;Figure 35-1 suggests that it is relevant, but that may be a simplification&lt;/STRIKE&gt;.&lt;/P&gt;&lt;P&gt;Note: I plan to set FOPT[BOOTPIN_OPT] = 1 and FOPT[BOOTSRC_SEL] = 01 to avoid the BootROM.&lt;/P&gt;&lt;P&gt;Edit: upon closer inspection, it seems that Fig 35-1 shows the pull-up/down portion is disconnected for ALT0/analog MUX setting&lt;/P&gt;</description>
      <pubDate>Wed, 14 Oct 2020 01:15:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Using-NMI-as-ADC/m-p/1167001#M58485</guid>
      <dc:creator>asapuntz</dc:creator>
      <dc:date>2020-10-14T01:15:02Z</dc:date>
    </item>
    <item>
      <title>Re: Using NMI as ADC</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Using-NMI-as-ADC/m-p/1167355#M58494</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN&gt;asapuntz,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;1. If you don't want to use the NMI, you can disable it by&amp;nbsp;FOPT[NMI_DIS] = 0&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; 2. You need to PORTD_PCR3[MUX] = 0&amp;nbsp;PORTD_PCR3[PE]=0, for the ADC function.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; 3. I think the analog mode 0 , you can disable the pull configuration if you really don't want to use it.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; 4.&amp;nbsp;&amp;nbsp;set FOPT[BOOTPIN_OPT] = 1 and FOPT[BOOTSRC_SEL] = 01 is OK&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Wish it helps you!&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If you still have questions about it, please kindly let me know!&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best Regards,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Kerry&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;-------------------------------------------------------------------------------&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Note:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;- If this post answers your question, please click the "Mark Correct" button. Thank you!&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;- We are following threads for 7 weeks after the last post, later replies are ignored&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Please open a new thread and refer to the closed one, if you have a related question at a later point in time.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;-----------------------------------------------------------------------------&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Oct 2020 09:27:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Using-NMI-as-ADC/m-p/1167355#M58494</guid>
      <dc:creator>kerryzhou</dc:creator>
      <dc:date>2020-10-14T09:27:40Z</dc:date>
    </item>
    <item>
      <title>Re: Using NMI as ADC</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Using-NMI-as-ADC/m-p/1167616#M58500</link>
      <description>&lt;P&gt;The focus of my question isn't how to do things, it's whether it's &lt;EM&gt;better&lt;/EM&gt; to leave PE&amp;nbsp; = 1 when MUX = 0 for this particular pin.&lt;/P&gt;&lt;P&gt;My concern is that any reset will revert the pin to NMI and BOOTCFG0 functionality (MUX = 7). But &lt;EM&gt;only POR&lt;/EM&gt; will re-enable the pull-up if software sets PE = 0.&lt;/P&gt;&lt;P&gt;Without the pull-up, the state of the pin will be unpredictable, possibly dependent on the external SAR filter capacitor.&lt;/P&gt;&lt;P&gt;FOPT can be used to disable both NMI and BOOTCFG0 functionality, but if BOOTCFG0 is still needed to select between Flash and ROM, the pull-up needs to be active during the boot selection process.&lt;/P&gt;&lt;P&gt;The pull-up should not be enabled once software changes MUX = 0. It looks like this will be achieved even if software leaves PE = 1, because the little mux at the top of RM Fig 35-1 would disable it regardless of the PE setting.&lt;/P&gt;&lt;P&gt;Am I understanding things correctly?&lt;/P&gt;</description>
      <pubDate>Wed, 14 Oct 2020 17:32:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Using-NMI-as-ADC/m-p/1167616#M58500</guid>
      <dc:creator>asapuntz</dc:creator>
      <dc:date>2020-10-14T17:32:11Z</dc:date>
    </item>
    <item>
      <title>Re: Using NMI as ADC</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Using-NMI-as-ADC/m-p/1167922#M58507</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN&gt;asapuntz,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;When your select the pin mux as the analog, the pull up and pull down circuit will be disconnect.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;So, if you want to use it as the analog pin, you just need to set MUX=0, and configure the ADC modules.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;The PE=1 is used for the digitial pin function.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;When you disable the NMI pin function, then set the NMI pin as the MUX=0 your NMI pin is the analog pin now.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;Your understanding is correct!&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Wish it helps you!&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If you still have questions about it, please kindly let me know!&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best Regards,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Kerry&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;-------------------------------------------------------------------------------&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Note:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;- If this post answers your question, please click the "Mark Correct" button. Thank you!&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;- We are following threads for 7 weeks after the last post, later replies are ignored&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Please open a new thread and refer to the closed one, if you have a related question at a later point in time.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;-----------------------------------------------------------------------------&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Oct 2020 03:15:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Using-NMI-as-ADC/m-p/1167922#M58507</guid>
      <dc:creator>kerryzhou</dc:creator>
      <dc:date>2020-10-15T03:15:25Z</dc:date>
    </item>
  </channel>
</rss>

