<?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>S12 / MagniV Microcontrollers中的主题 Re: S12ZVL32 ADC Problem In Sleep Mode</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12ZVL32-ADC-Problem-In-Sleep-Mode/m-p/978317#M16860</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/RadekS"&gt;RadekS&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First&amp;nbsp;thanks for your quick response.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I discussed it with a hardware engineer. He is saying that analog pin VDDX is connected to the VDDX pin of the microcontroller.&lt;/P&gt;&lt;P&gt;So, By disabling internal voltage regulator in sleep mode we can avoid taking high current by switches in sleep mode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I checked for datasheet I found this register.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_4.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/102037i4C3AC4AC601D6BD2/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_4.png" alt="pastedImage_4.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;and updated code as below.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;GoToSleep();&lt;BR /&gt; SCI0ACR1_RXEDGIE = 0;&amp;nbsp;&lt;BR /&gt; LP0CR_LPWUE = 0;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CPMUVREGCTL_INTXON = 0;&lt;BR /&gt;CPMUVREGCTL_EXTXON = 0;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I observed the problem still exists.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to overcome this problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 06 Feb 2020 00:01:41 GMT</pubDate>
    <dc:creator>chaitanya_kalyani</dc:creator>
    <dc:date>2020-02-06T00:01:41Z</dc:date>
    <item>
      <title>S12ZVL32 ADC Problem In Sleep Mode</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12ZVL32-ADC-Problem-In-Sleep-Mode/m-p/978312#M16855</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Currently, we are using one analog pin for reading multiple switches. Everything is working fine in active mode but when it goes into sleep mode getting current consumption as 240uA and when the switch is pressed current consumption is increasing up to 1mA.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need sleep mode current less than 200uA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using the below function to put the controller into sleep mode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void GoToSleep(void)&lt;BR /&gt;{&lt;BR /&gt; DisableInterrupts;&lt;BR /&gt; __asm(andcc #0x6f); // CCW settings: S = 0, I = 0&lt;BR /&gt; SCI0ASR1_RXEDGIF = 1; // clear flag&lt;BR /&gt; SCI0ACR1_RXEDGIE = 1; // edge interrupt enabled for wake up&lt;BR /&gt; EnableInterrupts;&lt;BR /&gt; __asm(STOP);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I checked with&amp;nbsp;e8188: ADC: High current in Stop Mode code. It is also not working to completely disable the ADC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;using the above type of network.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suggest some way to disable the analog pin current consumption in sleep mode and reduce current consumption in sleep mode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Working on an urgent project so quick response is highly appreciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Feb 2020 01:59:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12ZVL32-ADC-Problem-In-Sleep-Mode/m-p/978312#M16855</guid>
      <dc:creator>chaitanya_kalyani</dc:creator>
      <dc:date>2020-02-04T01:59:10Z</dc:date>
    </item>
    <item>
      <title>Re: S12ZVL32 ADC Problem In Sleep Mode</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12ZVL32-ADC-Problem-In-Sleep-Mode/m-p/978313#M16856</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&amp;nbsp;&lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/chaitanya.kalyani@seoyonelec-rnd.in"&gt;chaitanya.kalyani@seoyonelec-rnd.in&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;The current consumption specified in the RM is taken at certain conditions which does not include the current to drive external loads (A.1.8.1.S12ZVL rev.2.48).&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/100926iA925514807396ACE/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;When SW9 is switched, the current sourced from VDDX is 5V / 5,32k = 0,94mA&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR, Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Feb 2020 09:25:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12ZVL32-ADC-Problem-In-Sleep-Mode/m-p/978313#M16856</guid>
      <dc:creator>danielmartynek</dc:creator>
      <dc:date>2020-02-04T09:25:11Z</dc:date>
    </item>
    <item>
      <title>Re: S12ZVL32 ADC Problem In Sleep Mode</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12ZVL32-ADC-Problem-In-Sleep-Mode/m-p/978314#M16857</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Chaytanya,&lt;/P&gt;&lt;P&gt;The workaround for&amp;nbsp;e8188 isn't part of your&amp;nbsp;GoToSleep() function. Could you please share more details about how did you test it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is ADC triggered in some interrupt (edge interrupt, comparator, timer,...), or only by code in the main loop?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you switch SW8 or SW9, the approximately 1mA current flows from VDDX to the GND through R21, R33,...&lt;/P&gt;&lt;P&gt;Did the power consumption fall back to the 240uA when you switch SW8, SW9 off?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Radek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Feb 2020 13:22:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12ZVL32-ADC-Problem-In-Sleep-Mode/m-p/978314#M16857</guid>
      <dc:creator>RadekS</dc:creator>
      <dc:date>2020-02-04T13:22:50Z</dc:date>
    </item>
    <item>
      <title>Re: S12ZVL32 ADC Problem In Sleep Mode</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12ZVL32-ADC-Problem-In-Sleep-Mode/m-p/978315#M16858</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/RadekS"&gt;RadekS&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am calling ADC&amp;nbsp;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;workaround for&amp;nbsp;e8188 before calling '&lt;SPAN&gt;GoToSleep()' function.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;SPAN&gt;Not using any interrupt. Just reading ADC data at 1ms interrupt basis in active mode only.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;SPAN&gt;Yes, When SW8, SW9 is off then-current consumption falling back to 240uA.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;SPAN&gt;In the project, there are only switches and no components to consume current and switches are connected in a similar way.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Feb 2020 13:53:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12ZVL32-ADC-Problem-In-Sleep-Mode/m-p/978315#M16858</guid>
      <dc:creator>chaitanya_kalyani</dc:creator>
      <dc:date>2020-02-04T13:53:53Z</dc:date>
    </item>
    <item>
      <title>Re: S12ZVL32 ADC Problem In Sleep Mode</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12ZVL32-ADC-Problem-In-Sleep-Mode/m-p/978316#M16859</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Hello Chaitanya,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;thank you for your clarification.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;So, the power consumption when SW8 or 9 ON state may be limited by increasing resistor values. The other option is using HVI pin (PL0), which already contains a high ohm voltage divider with an option for routing to the ADC module.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;When SW8 or 9 are OFF, the power consumption may be decreased by disabling potentially unnecessary clock sources (like an external oscillator, ACLK). &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Additionally, you should avoid configuration with floating unused digital input pins.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Please look at&amp;nbsp;Table 1-6. Pin Summary in RM and check reset state for unused pins. If the pull device is by default Off after reset, you should configure these pins into some known state (internal/external pull-up/down or digital output). For example port T pins.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Note: This is not necessary for port AD until we enable the appropriate digital input buffer (DIEN register).&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;I hope it helps you.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Best reagrds&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Radek&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Feb 2020 14:56:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12ZVL32-ADC-Problem-In-Sleep-Mode/m-p/978316#M16859</guid>
      <dc:creator>RadekS</dc:creator>
      <dc:date>2020-02-04T14:56:09Z</dc:date>
    </item>
    <item>
      <title>Re: S12ZVL32 ADC Problem In Sleep Mode</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12ZVL32-ADC-Problem-In-Sleep-Mode/m-p/978317#M16860</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/RadekS"&gt;RadekS&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First&amp;nbsp;thanks for your quick response.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I discussed it with a hardware engineer. He is saying that analog pin VDDX is connected to the VDDX pin of the microcontroller.&lt;/P&gt;&lt;P&gt;So, By disabling internal voltage regulator in sleep mode we can avoid taking high current by switches in sleep mode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I checked for datasheet I found this register.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_4.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/102037i4C3AC4AC601D6BD2/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_4.png" alt="pastedImage_4.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;and updated code as below.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;GoToSleep();&lt;BR /&gt; SCI0ACR1_RXEDGIE = 0;&amp;nbsp;&lt;BR /&gt; LP0CR_LPWUE = 0;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CPMUVREGCTL_INTXON = 0;&lt;BR /&gt;CPMUVREGCTL_EXTXON = 0;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I observed the problem still exists.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to overcome this problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Feb 2020 00:01:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12ZVL32-ADC-Problem-In-Sleep-Mode/m-p/978317#M16860</guid>
      <dc:creator>chaitanya_kalyani</dc:creator>
      <dc:date>2020-02-06T00:01:41Z</dc:date>
    </item>
    <item>
      <title>Re: S12ZVL32 ADC Problem In Sleep Mode</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12ZVL32-ADC-Problem-In-Sleep-Mode/m-p/978318#M16861</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello &lt;A _jive_internal="true" href="https://community.nxp.com/people/chaitanya.kalyani@seoyonelec-rnd.in"&gt;&lt;SPAN style="color: #3d9ce7; border: none windowtext 1.0pt; padding: 0in; background: white; text-decoration: none;"&gt;Chaitanya Kalyani&lt;/SPAN&gt;&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;The VDDX cannot be disabled – the CPU is powered from it.&lt;/P&gt;&lt;P&gt;The CPMUVREGCTL allows configuring VDDX only in one of two configurations (select internal or external VDDX regulator). See table 9-30.&lt;/P&gt;&lt;P&gt;Additionally, this register may be written just once in normal mode (until next reset).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Both internal and external regulators are enabled by default after reset. Since the target voltage for the external regulator is slightly higher, the current will flow through external PNP when the external PNP transistor is assembled. So, this VDDX settings in CPMUVREGCTL is useful rather only for tuning applications during power dissipation tests (the external PNP transistor allows offload heat generated by VDDX regulator).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In fact, both internal and external regulators are disabled in MCU stop mode. The VDDX voltage in stop mode is driven by Reduced Performance Mode (RPM) regulator with the limited current capability and slightly lower accuracy. On another side, this regulator is resistant to the short circuit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hard to advise how valuable solve this circuit. This must be discussed with the original designer. The network looks quite complicated when it is just a switch(es).&lt;/P&gt;&lt;P&gt;Every resistor has a different dimension while R12 and R33 are quite big packages. Do you expect any high voltage at this point? Their requested accuracy (1%) also confuses me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I guess that it works as a configuration switch measured by the ADC module (simple static voltage divider). Or is it something else?&lt;/P&gt;&lt;P&gt;From my point of view, the R12, R33 and R21 values may be simply ten times bigger or even more (e.g. 15k, 8k2, 30k). In such a case, the ADC voltages remain the same level and current through this divider probably drops below an acceptable level. Worst case 5V/(30k+8k2)=130uA&amp;nbsp; (I do not count with accuracy ranges, now)&lt;/P&gt;&lt;P&gt;On another side, the R44 value is quite big (100R or 1k is more typical). I would also recommend slightly increase C27 value. For minimize voltage drop during ADC measurement, the external capacitance should be bigger. 10 or 33nF sounds reasonable. &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope it helps you&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Radek&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Feb 2020 14:27:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12ZVL32-ADC-Problem-In-Sleep-Mode/m-p/978318#M16861</guid>
      <dc:creator>RadekS</dc:creator>
      <dc:date>2020-02-07T14:27:11Z</dc:date>
    </item>
    <item>
      <title>Re: S12ZVL32 ADC Problem In Sleep Mode</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12ZVL32-ADC-Problem-In-Sleep-Mode/m-p/1259994#M17803</link>
      <description>&lt;P&gt;STOP mode example where stop current is lower than 30uA and can wake up by LIN:&lt;/P&gt;&lt;P&gt;(workaround is from errata: ERR008188: ADC: High current in Stop Mode, &lt;A href="https://www.nxp.com/docs/en/errata/MSE9S12ZVL_0N22G.pdf" target="_blank"&gt;https://www.nxp.com/docs/en/errata/MSE9S12ZVL_0N22G.pdf&lt;/A&gt;)&lt;/P&gt;&lt;P&gt;SCI0CR1_WAKE = 1; /* Wake up SCI at an idle condition on the RXD pin */&lt;BR /&gt;SCI0SR2_AMAP = 1; /* Make SCIAxxx registers accessible */&lt;BR /&gt;SCI0ACR1_RXEDGIE = 1; /* Edge interrupt enabled for wake up */&lt;BR /&gt;SCI0ASR1_RXEDGIF = 1; /* Clear flag */&lt;BR /&gt;SCI0SR2_AMAP = 0; /* Make SCIAxxx registers inaccessible */&lt;BR /&gt;SCI0CR2_RWU = 0x01; /* SCI enters into standby state */&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;// Enter STOP mode&lt;BR /&gt;__DI();&lt;BR /&gt;ADC0_stop_current_workaround(); // Subroutine must be executed with interrupt protection&lt;BR /&gt;asm(andcc #0x6f); /* CCW settings: S = 0, I = 0 */&lt;BR /&gt;asm(stop); /* MCU enters Stop mode if S =0 in CCW */&lt;BR /&gt;...&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;static void ADC0_stop_current_workaround(void)&lt;BR /&gt;{&lt;BR /&gt;byte tmp_ADCxCTL_0 = ADC0CTL_0; // Save customer settings, these values will be restoredafterwards&lt;BR /&gt;byte tmp_ADCxTIM = ADC0TIM;&lt;BR /&gt;byte tmp_ADCxSTS = ADC0STS;&lt;BR /&gt;ADC0CTL_0 =0x00; //Disable ADC&lt;BR /&gt;ADC0TIM = 0x00; // ADC is set to maximum frequency&lt;BR /&gt;// Devicespecification of allowed frequency is ignored, // the ADC conversion is stopped when reachingMask Set Errata for Mask 0N22G / 0P80C,&lt;BR /&gt;// Rev. March 1120214NXP Semiconductors error state.&lt;BR /&gt;// There is no conversion result generated.&lt;BR /&gt;ADC0CTL_0 = 0x88; // ADC is enabled,single access mode data bus, restart mode&lt;BR /&gt;ADC0CTL_0 = 0x88; // Re-do in order toguarantee ADC is ready for requests before Restart Event occurs&lt;BR /&gt;ADC0FLWCTL = 0x20; //ADC is restarted, RSTA bit is set: the first command of list 0 is loaded from memory.&lt;BR /&gt;//The command type does not matter, the conversion is immediately stopped&lt;BR /&gt;while(ADC0FLWCTL_RSTA == 1) {} // Wait for restart completion(within a few clock cycles)&lt;BR /&gt;ADC0FLWCTL = 0x40; // Start conversion(TRIG)&lt;BR /&gt;ADC0FLWCTL = 0x40; // The second TRIGimmediately generates a TRIG_EIF, ERROR state is entered&lt;BR /&gt;while (ADC0EIF_TRIG_EIF ==0) {} // Wait for trigger error interrupt flag (within a few clock cycles)&lt;BR /&gt;ADC0CTL_0_ADC_SR =1; // Execute ADC soft-reset (SR), ADC enters IDLE state&lt;BR /&gt;while (ADC0STS_READY == 0) {} //Wait for ADC soft-reset done (within a few clock cycles)&lt;BR /&gt;ADC0CTL_0 = 0x00; // ADC is disabled&lt;BR /&gt;ADC0TIM = tmp_ADCxTIM; //Restore previous customer settings&lt;BR /&gt;ADC0STS = tmp_ADCxSTS;&lt;BR /&gt;ADC0CTL_0 = tmp_ADCxCTL_0; // ADC0CTL_0 is the last one to berestored, in case ADC was enabled before...&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Sat, 10 Apr 2021 10:26:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12ZVL32-ADC-Problem-In-Sleep-Mode/m-p/1259994#M17803</guid>
      <dc:creator>mmiki</dc:creator>
      <dc:date>2021-04-10T10:26:09Z</dc:date>
    </item>
  </channel>
</rss>

