<?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: S9KEA ADC in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/S9KEA-ADC/m-p/1796018#M65985</link>
    <description>&lt;P&gt;Hi Pls help ,thanks&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;The ADC initialization has set bit 29 of the SIM_SCGC register, which also uses a 10M external crystal oscillator.&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;The following symptoms occasionally occur during power-on: The ADC does not work in single conversion mode and is read&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;Register observation, ADC_SC2, ADC_SC3 write value is normal,&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;The ADC_SC1 register cannot be written, resulting in the ADC cannot be triggered, where the ADCH value is 11111, and repeated writes cannot be written.&lt;/SPAN&gt;&lt;SPAN class=""&gt;Don't know why?&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;Register ADC_SC1 failed,&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;Is the power pin VDD used directly with VDDA/VREFH, or does the power-on slope affect the ADC?&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ADC初始化已经设置寄存器SIM_SCGC的第29位，也使用了10M的外部晶振。&lt;BR /&gt;上电是时偶尔出现以下现象：单次转换模式下ADC不工作，读取&lt;BR /&gt;寄存器观察，ADC_SC2，ADC_SC3写入值正常，&lt;BR /&gt;而寄存器ADC_SC1无法写入，导致ADC不能触发，其中的ADCH值是11111，重复写也无法写入。不知道什么原因？&lt;BR /&gt;寄存器ADC_SC1失败，&lt;/P&gt;&lt;P&gt;电源引脚VDD与VDDA/VREFH，直接连在一起使用，或者上电斜率是否会影响ADC？&lt;/P&gt;</description>
    <pubDate>Fri, 26 Jan 2024 10:19:17 GMT</pubDate>
    <dc:creator>caesar_song</dc:creator>
    <dc:date>2024-01-26T10:19:17Z</dc:date>
    <item>
      <title>S9KEA ADC</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/S9KEA-ADC/m-p/1795696#M65982</link>
      <description>&lt;P class=""&gt;&lt;SPAN class=""&gt;Hi&amp;nbsp; Would you kindly heip&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;Problem 1: After ADC initialization, ADC module does not work. Read register ADC_SC1 to observe that the ADCH value is 11111, which means that ADC module is disabled, and it is useless to write repeatedly.&lt;/SPAN&gt;&lt;SPAN class=""&gt;While other registers ADC_SC2 and ADC_SC3 are normal, why fail to write register ADC_SC1?&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;Question 2: Power pins VDD and VDDA/VREFH are directly connected together, and frequent power-on and power-off will cause the phenomenon of problem 1. Is it caused by this reason?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;问题1：ADC初始化后，ADC模块不工作，读寄存器ADC_SC1观察，其中的ADCH值是11111，也就是说ADC模块禁能，再重复写也没用。而其他寄存器ADC_SC2，ADC_SC3正常，为什么写寄存器ADC_SC1失败，&lt;/P&gt;&lt;P&gt;问题2：电源引脚VDD与VDDA/VREFH，直接连在一起使用，频繁上下电，是否会导致问题一的现象，是否是由于这个原因引起的？&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jan 2024 00:44:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/S9KEA-ADC/m-p/1795696#M65982</guid>
      <dc:creator>caesar_song</dc:creator>
      <dc:date>2024-01-26T00:44:10Z</dc:date>
    </item>
    <item>
      <title>Re: S9KEA ADC</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/S9KEA-ADC/m-p/1795727#M65984</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;You have enable ADC gated clock by setting the bit 29 of SIM_SCGC register before you write ADC registers.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="xiangjun_rong_0-1706235926505.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/260157iB3913616F6C64102/image-size/medium?v=v2&amp;amp;px=400" role="button" title="xiangjun_rong_0-1706235926505.png" alt="xiangjun_rong_0-1706235926505.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Secondly, you have to connect a crystal on the XTAL/EXTAL pins, which is ADC clock.&lt;/P&gt;
&lt;P&gt;Hope it can help you&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;XiangJun Rong&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jan 2024 02:30:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/S9KEA-ADC/m-p/1795727#M65984</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2024-01-26T02:30:20Z</dc:date>
    </item>
    <item>
      <title>Re: S9KEA ADC</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/S9KEA-ADC/m-p/1796018#M65985</link>
      <description>&lt;P&gt;Hi Pls help ,thanks&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;The ADC initialization has set bit 29 of the SIM_SCGC register, which also uses a 10M external crystal oscillator.&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;The following symptoms occasionally occur during power-on: The ADC does not work in single conversion mode and is read&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;Register observation, ADC_SC2, ADC_SC3 write value is normal,&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;The ADC_SC1 register cannot be written, resulting in the ADC cannot be triggered, where the ADCH value is 11111, and repeated writes cannot be written.&lt;/SPAN&gt;&lt;SPAN class=""&gt;Don't know why?&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;Register ADC_SC1 failed,&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;Is the power pin VDD used directly with VDDA/VREFH, or does the power-on slope affect the ADC?&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ADC初始化已经设置寄存器SIM_SCGC的第29位，也使用了10M的外部晶振。&lt;BR /&gt;上电是时偶尔出现以下现象：单次转换模式下ADC不工作，读取&lt;BR /&gt;寄存器观察，ADC_SC2，ADC_SC3写入值正常，&lt;BR /&gt;而寄存器ADC_SC1无法写入，导致ADC不能触发，其中的ADCH值是11111，重复写也无法写入。不知道什么原因？&lt;BR /&gt;寄存器ADC_SC1失败，&lt;/P&gt;&lt;P&gt;电源引脚VDD与VDDA/VREFH，直接连在一起使用，或者上电斜率是否会影响ADC？&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jan 2024 10:19:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/S9KEA-ADC/m-p/1796018#M65985</guid>
      <dc:creator>caesar_song</dc:creator>
      <dc:date>2024-01-26T10:19:17Z</dc:date>
    </item>
    <item>
      <title>Re: S9KEA ADC</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/S9KEA-ADC/m-p/1796463#M65987</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Okay, I see that you has &lt;SPAN class=""&gt;set bit 29 of the SIM_SCGC register, which also uses a 10M external crystal oscillator. You have connected the VDD, VDDA/VREFH, it is okay.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;I do not know if you use software triggering mode or hardware mode.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;If you use software mode and use polling mode to check if the ADC sampling is complete, this is the code:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;uint16_t sample[100];&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;uint16_t i;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;void main()&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;{&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;i=0;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;ADC_SC2=0x00; //use software triggering mode&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;while(1)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;{&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;&amp;nbsp; //write the channel to ADC_SC1 register&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;ADC_SC1=0x01; //start-up ADC channel1 conversion&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;while(!(ADC_SC1&amp;amp;0x80)) {}&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;sample[i]=ADC_R;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;if(i&amp;lt;100)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;&amp;nbsp; {&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; i++;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;}&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;else&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;{&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;i=0;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;__asm("nop"); //set a break point here&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;}&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;}&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;}&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;Pls have a try&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;Hope it can help you&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;BR&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;XiangJun Rong&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jan 2024 01:52:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/S9KEA-ADC/m-p/1796463#M65987</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2024-01-29T01:52:41Z</dc:date>
    </item>
    <item>
      <title>Re: S9KEA ADC</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/S9KEA-ADC/m-p/1797234#M65990</link>
      <description>&lt;P&gt;Thanks for your strong support!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;您好，您还是没理解我提出的问题，&lt;/DIV&gt;&lt;DIV&gt;我已经能够正常使用ADC模块，多数情况下能够正常运行。&lt;/DIV&gt;&lt;DIV&gt;问题出现在刚上电的时刻，而且是偶尔出现。&lt;/DIV&gt;&lt;DIV&gt;当发现ADC不能触发和转换时，读出寄存器ADC_SC1，ADC_SC2，ADC_SC3观察，发现ADC_SC1中的ADCH = 0x1F，而寄存器ADC_SC2，ADC_SC3写入正确。&lt;/DIV&gt;&lt;DIV&gt;也就是说只有寄存器ADC_SC1写失败，触发通道没写入ADC_SC1。在故障出现后，多次写ADC_SC1，并读出ADC_SC1观察，发现ADC_SC1中的ADCH始终为11111。&lt;/DIV&gt;&lt;DIV&gt;我想知道的是，为什么刚上电时会出现这种现象，且只有重新上电才可以恢复。&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;我使用的是软件触发模式。ADC初始化代码如下：&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;you still don't understand my question,&lt;/DIV&gt;&lt;DIV&gt;I can use the ADC module aright，and it works aright in most cases.&lt;/DIV&gt;&lt;DIV&gt;But in the moment of MCU power on , the problem occurs occasionally.&lt;/DIV&gt;&lt;DIV&gt;When the fault occurs ,the ADC cannot be triggered and converted,&amp;nbsp; then read the registers ADC_SC1, ADC_SC2, ADC_SC3 and observe them,&amp;nbsp; ADCH = 0x1F in ADC_SC1, and the registers ADC_SC2, ADC_SC3 are written correctly.&lt;/DIV&gt;&lt;DIV&gt;In other words, only register ADC_SC1 failed to write, triggering channel can not be written to ADC_SC1. After the fault occurs, write ADC_SC1 for many times, read ADC_SC1, and observe that the ADCH in ADC_SC1 is always 11111.&lt;/DIV&gt;&lt;DIV&gt;then&amp;nbsp; it can only be restored when the power is turned on again, or the MCU be reset.&lt;/DIV&gt;&lt;DIV&gt;Now,What I want to know&amp;nbsp; why this fault occurs when the power is just turned on,&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;this is the code:&lt;/DIV&gt;&lt;DIV&gt;//-------------------------------------------------------------------------------------------------------------------&lt;/DIV&gt;&lt;DIV&gt;//&amp;nbsp; @brief&amp;nbsp; &amp;nbsp; &amp;nbsp; ADC初始化&lt;/DIV&gt;&lt;DIV&gt;//&amp;nbsp; &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/197964"&gt;@Param&lt;/a&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; adcn_ch&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;选择ADC通道&lt;/DIV&gt;&lt;DIV&gt;//-------------------------------------------------------------------------------------------------------------------&lt;/DIV&gt;&lt;DIV&gt;void adc_init(ADCn_Ch adcn_ch)&lt;/DIV&gt;&lt;DIV&gt;{&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; SIM-&amp;gt;SCGC |= SIM_SCGC_ADC_MASK;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//开启ADC时钟&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; ADC-&amp;gt;APCTL1 |= 1&amp;lt;&amp;lt;adcn_ch;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //使能ADC引脚&lt;/DIV&gt;&lt;DIV&gt;}&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;void adc_start(ADCn_Ch adcn_ch)&lt;/DIV&gt;&lt;DIV&gt;{&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; ADC-&amp;gt;SC3 = (0&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | ADC_SC3_ADIV(3)&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//分频系数8&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | ADC_SC3_MODE(0x01)&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//分辨率10位&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | ADC_SC3_ADICLK(1)&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//使用总线时钟2分频最为ADC得时钟源&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; );&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; ADC-&amp;gt;SC2 = ADC_SC2_REFSEL(0);&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//基准电压选择&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; ADC-&amp;gt;SC1 = ADC_SC1_ADCH(adcn_ch);&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//启动转换&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;}&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;void TaskAdc_Init(void)&lt;/DIV&gt;&lt;DIV&gt;{&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;adc_init(TIN_ADC);&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//ADC通道初始化&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;adc_start(TIN_ADC);&amp;nbsp; &amp;nbsp; &amp;nbsp; //ADC转换开始&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;}&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;uint16 adc_get(void)&lt;/DIV&gt;&lt;DIV&gt;{&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; uint16 result;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; if(!(ADC-&amp;gt;SC1 &amp;amp; ADC_SC1_COCO_MASK)) return 0xFFFF; //未转换完成返回-1&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; result = ADC-&amp;gt;R;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; return (result &amp;amp; ADC_R_ADR_MASK);&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //返回结果&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;}&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;//////////////&lt;/DIV&gt;&lt;DIV&gt;TaskAdc_Init（）；&lt;/DIV&gt;&lt;DIV&gt;uint16 temp ;&lt;/DIV&gt;&lt;DIV&gt;temp = adc_get();&lt;/DIV&gt;&lt;DIV&gt;if(0xFFFF!= temp)&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;{&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;}&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;else&lt;/DIV&gt;&lt;DIV&gt;{&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;//set a break point here. Then the fault occurs: ADCH = 0x1F&lt;/DIV&gt;&lt;DIV&gt;}&lt;/DIV&gt;</description>
      <pubDate>Tue, 30 Jan 2024 00:58:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/S9KEA-ADC/m-p/1797234#M65990</guid>
      <dc:creator>caesar_song</dc:creator>
      <dc:date>2024-01-30T00:58:31Z</dc:date>
    </item>
    <item>
      <title>Re: S9KEA ADC</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/S9KEA-ADC/m-p/1797349#M65992</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Okay, I see your issue.&lt;/P&gt;
&lt;P&gt;If you fail to write the ADC_SC1, pls write the ADC_SC1 with ADCH 11111 and set the ADC_SC4[AFDEP] 000 in binary.&lt;/P&gt;
&lt;P&gt;Pls have a try&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;XiangJun Rong&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jan 2024 03:30:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/S9KEA-ADC/m-p/1797349#M65992</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2024-01-30T03:30:18Z</dc:date>
    </item>
    <item>
      <title>回复： S9KEA ADC</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/S9KEA-ADC/m-p/1801193#M66014</link>
      <description>&lt;P&gt;您好，我已经按照您说的实行了。&lt;BR /&gt;还是没有解决问题，故障还是偶尔出现在刚上电的时刻。也就是说，上电时存在ADC模块启动不正常的现象，且通过ADC初始化，不能消除。&lt;BR /&gt;当发现ADC不能触发和转换时，ADC_SC1中的ADCH = 0x1F。&lt;BR /&gt;程序中ADC初始化时已经将ADC_SC4[AFDEP]写入 000，且每次触发通道转换时，先向ADC_SC1写入0x1F，再写入要触发的通道号。&lt;BR /&gt;在故障出现后，通过清除SIM_SCGC的第29位，关闭 ADC 时钟，然后再打开，重新设置ADC模块的相关寄存器。ADC模块仍不能回复正常工作。&lt;/P&gt;&lt;P&gt;什么原因能导致这个MCU 的ADC在上电时出现故障？且故障永远无法消除，必须通过重新上电或MCU复位，才有可能消除。&lt;BR /&gt;我们能进行电话沟通吗？&lt;BR /&gt;我的电话和微信是：13287679213，感激不尽。&lt;/P&gt;&lt;P&gt;Hi,&lt;BR /&gt;I've done what you said.&lt;BR /&gt;The fault still exists,&lt;BR /&gt;and the fault still occasionally appears at the moment of power on，and it cannot be eliminated through ADC initialization.&lt;BR /&gt;ADC_SC1 ADCH = 0x1F，when it is found that the ADC cannot trigger and convert. then ADC_SC1 can not be written, ADC_SC1 still keeps&lt;BR /&gt;0x1F.&lt;BR /&gt;ADC_SC4[AFDEP] has been written to 000 when the ADC is initialized in the program, and each time the channel conversion is triggered, 0x1F is written to ADC_SC1 first, and then the channel number to be triggered.&lt;BR /&gt;After a fault occurs, turning off the ADC clock by clearing bit 29 of SIM_SCGC, then turning it on again, by clearing bit 29 of SIM_SCGC, Rewrite the relevant registers of the ADC module, The fault always exists.&lt;/P&gt;&lt;P&gt;What causes the ADC of this MCU fail during power-on? And the fault can never be eliminated, except re-powered or MCU reset.&lt;/P&gt;&lt;P&gt;Can we talk on the phone ？My phone number is 13287679213，So is wechat. Very grateful!!!&lt;/P&gt;</description>
      <pubDate>Sat, 03 Feb 2024 09:47:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/S9KEA-ADC/m-p/1801193#M66014</guid>
      <dc:creator>FuJu</dc:creator>
      <dc:date>2024-02-03T09:47:05Z</dc:date>
    </item>
    <item>
      <title>Re: S9KEA ADC</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/S9KEA-ADC/m-p/1801194#M66015</link>
      <description>&lt;P&gt;您好，我已经按照您说的实行了。&lt;BR /&gt;还是没有解决问题，故障还是偶尔出现在刚上电的时刻。也就是说，上电时存在ADC模块启动不正常的现象，且通过ADC初始化，不能消除。&lt;BR /&gt;当发现ADC不能触发和转换时，ADC_SC1中的ADCH = 0x1F。&lt;BR /&gt;程序中ADC初始化时已经将ADC_SC4[AFDEP]写入 000，且每次触发通道转换时，先向ADC_SC1写入0x1F，再写入要触发的通道号。&lt;BR /&gt;在故障出现后，通过清除SIM_SCGC的第29位，关闭 ADC 时钟，然后再打开，重新设置ADC模块的相关寄存器。ADC模块仍不能回复正常工作。&lt;/P&gt;&lt;P&gt;什么原因能导致这个MCU 的ADC在上电时出现故障？且故障永远无法消除，必须通过重新上电或MCU复位，才有可能消除。&lt;BR /&gt;我们能进行电话沟通吗？&lt;BR /&gt;我的电话和微信是：13287679213，感激不尽。&lt;/P&gt;&lt;P&gt;Hi,&lt;BR /&gt;I've done what you said.&lt;BR /&gt;The fault still exists,&lt;BR /&gt;and the fault still occasionally appears at the moment of power on，and it cannot be eliminated through ADC initialization.&lt;BR /&gt;ADC_SC1 ADCH = 0x1F，when it is found that the ADC cannot trigger and convert. then ADC_SC1 can not be written, ADC_SC1 still keeps&lt;BR /&gt;0x1F.&lt;BR /&gt;ADC_SC4[AFDEP] has been written to 000 when the ADC is initialized in the program, and each time the channel conversion is triggered, 0x1F is written to ADC_SC1 first, and then the channel number to be triggered.&lt;BR /&gt;After a fault occurs, turning off the ADC clock by clearing bit 29 of SIM_SCGC, then turning it on again, by clearing bit 29 of SIM_SCGC, Rewrite the relevant registers of the ADC module, The fault always exists.&lt;/P&gt;&lt;P&gt;What causes the ADC of this MCU fail during power-on? And the fault can never be eliminated, except re-powered or MCU reset.&lt;/P&gt;&lt;P&gt;Can we talk on the phone ？My phone number is 13287679213，So is wechat. Very grateful!!!&lt;/P&gt;</description>
      <pubDate>Sat, 03 Feb 2024 09:49:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/S9KEA-ADC/m-p/1801194#M66015</guid>
      <dc:creator>FuJu</dc:creator>
      <dc:date>2024-02-03T09:49:50Z</dc:date>
    </item>
    <item>
      <title>Re: S9KEA ADC</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/S9KEA-ADC/m-p/1801202#M66016</link>
      <description>&lt;P&gt;&lt;SPAN&gt;硬件的模拟电压可上电时还没稳定好。会导致ADC模块不能使用吗？我的&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If the voltage of the hardware is not stable when it is powered on, Will the power supply cause this fault?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 03 Feb 2024 10:17:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/S9KEA-ADC/m-p/1801202#M66016</guid>
      <dc:creator>FuJu</dc:creator>
      <dc:date>2024-02-03T10:17:20Z</dc:date>
    </item>
    <item>
      <title>Re: S9KEA ADC</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/S9KEA-ADC/m-p/1801371#M66022</link>
      <description>&lt;P&gt;Hi，&lt;/P&gt;
&lt;P&gt;我检查了 KEA family的勘误表， 它没有提及ADC这个问题，我也没有好的方法。&lt;/P&gt;
&lt;P&gt;作为一个workaround,当这个问题发生时，你可以产生system reset.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="xiangjun_rong_0-1707034891284.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/261818iF5C313CE396BC3EC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="xiangjun_rong_0-1707034891284.png" alt="xiangjun_rong_0-1707034891284.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;SCB-AIRCR|=0x04;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope it can help you&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;XiangJun Rong&lt;/P&gt;</description>
      <pubDate>Sun, 04 Feb 2024 08:24:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/S9KEA-ADC/m-p/1801371#M66022</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2024-02-04T08:24:40Z</dc:date>
    </item>
  </channel>
</rss>

