<?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: MCF5213 ADC Disaster in ColdFire/68K Microcontrollers and Processors</title>
    <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/MCF5213-ADC-Disaster/m-p/177301#M7017</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;FONT size="3"&gt;Update:&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="3"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="3"&gt;Freescale support got back to me regarding this issue.&amp;nbsp; They believe there is no internal ADC Vref and acknowledged the data sheet is incorrect.&amp;nbsp;&amp;nbsp;They were not able to explain why&amp;nbsp;the part is scaling to&amp;nbsp;3.3V off a 3.0V reference using the VRH and VRL pins, and&amp;nbsp;I do not have AN2/AN6 hooked up for comparison.&amp;nbsp; So that will have to remain a mystery....&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="3"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="3"&gt;They said the CAL register actually selects between external references provided at VRH/VRL and AN2/AN6.&amp;nbsp; While that logically makes no sense, it does mimic the behavior I have seen.&lt;/FONT&gt;&lt;/DIV&gt;&lt;P&gt;&lt;FONT size="3"&gt;SEL_VREFH -0 VRH -1 AN2&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;SEL_VREFL -0 VRL -1 AN6&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;They were not entirely&amp;nbsp;sure about the&amp;nbsp;+3.1V vref&amp;nbsp;errata and how it applied to the MCF5213.&amp;nbsp;&amp;nbsp; They said the errata does apply to the MCF5213, but could possibly not affect the AN2/AN6 pins.&amp;nbsp; So when using the 5213 you will need to use a 3.1 to 3.2 V vref, only.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;I hope this offers some clarity for anyone else facing this problem in the future.&lt;/FONT&gt;&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 04 Aug 2008 20:56:46 GMT</pubDate>
    <dc:creator>Juason</dc:creator>
    <dc:date>2008-08-04T20:56:46Z</dc:date>
    <item>
      <title>MCF5213 ADC Disaster</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/MCF5213-ADC-Disaster/m-p/177298#M7014</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hello everyone,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp; I've come acrossed a bit of conflicting documentation regarding the ADC and VREFs of the MCF5213.&amp;nbsp; For starters the CAL register and surrounding illustrations in the HW Reference manual Rev3 from 3/2007 seems to indicate this processor supports both internal and external VREFs - however the internal VREF voltage is never given.&amp;nbsp; Further confusing the issue is the CAL register definition which has INTERNAL and AN2/AN6 given for the options.&amp;nbsp; Where does AN2/AN6 come from?&amp;nbsp; Is this an error? I thought VRH and VRL were the Vref pins?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp; In our design we use a 3.3V supply for the Coldfire and a 3.0V Vref for the VREFH pin which is connected to the VDDA pin.&amp;nbsp; I later found the errata showing that VREF needs to be 3.1V or higher to avoid random crazy values from coming out of the ADC - a problem we've not seen but are going to redesign to avoid.&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp; The reason why I'm asking for clarification is because the ADC scale seems off and noisy, and the CAL register seems broken.&amp;nbsp;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;- First of all I have the CAL register set to 0 which indicates an internal VREF.&amp;nbsp; If I set the external vref bits the ADC fails to return anything but 0s.&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;- Second,&amp;nbsp;the input range to the ADC&amp;nbsp;is 0-3.0V to coincide with the VREF of 3.0V.&amp;nbsp;&amp;nbsp; However at 3.0V I'm seeing an ADC result of 3900ish - which implies a 3.3V vref is really being used.&amp;nbsp; The only way this is possible is if there is an internal VREF.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;- Third I'm noticing quite a bit of noise in my ADC readings that does not correlate to measured noise using a scope.&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp; Thanks in advance for any help on this.&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;- Jason&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Jul 2008 04:03:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/MCF5213-ADC-Disaster/m-p/177298#M7014</guid>
      <dc:creator>Juason</dc:creator>
      <dc:date>2008-07-31T04:03:00Z</dc:date>
    </item>
    <item>
      <title>Re: MCF5213 ADC Disaster</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/MCF5213-ADC-Disaster/m-p/177299#M7015</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hi Jason&lt;BR /&gt;&lt;BR /&gt;If you set the bits SEL_VREFH and SEL_VREFL in the CAL register, the (normally) ADC inputs AN2 and AN6 are used as VREF inputs - this means that these should be connected to the reference voltages (eg. 0V and 3.0V - assuming these are the reference voltages). These are then used instead of the dedicated VREFH and VREFL inputs.&lt;BR /&gt;&lt;BR /&gt;I believe the internal REF that you are implying to is in fact the reference which has been selected (either from VREF inputs of the alternative ones). I don't think that any of the chips with the 12 bit ADC has an internal reference of its own so something has to be connected - make sure that it is also well filtered to achieve good results (suggestions are in the user manuals)&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;&lt;BR /&gt;Mark&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.uTasker.com" rel="nofollow" target="_blank"&gt;&lt;/A&gt;&lt;A href="https://community.nxp.com/www.uTasker.com" target="test_blank"&gt;www.uTasker.com&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Aug 2008 03:03:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/MCF5213-ADC-Disaster/m-p/177299#M7015</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2008-08-01T03:03:25Z</dc:date>
    </item>
    <item>
      <title>Re: MCF5213 ADC Disaster</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/MCF5213-ADC-Disaster/m-p/177300#M7016</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;If that is the case, then the&amp;nbsp;544 page Reference Manual was&amp;nbsp;written in haste without any regard for the end user.&amp;nbsp;&amp;nbsp;&amp;nbsp; I apologize for being upset,&amp;nbsp;but I&amp;nbsp;consistantly get burned by incorrect and contradictory datasheets from Freescale.&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Does it point out&amp;nbsp;AN2/6 anywhere else in the Reference Manual?&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; In Block Diagram 23.3 you can see VREFH and VREFL are not coming in via AN2/6.&amp;nbsp; It is an entirely separate block which is why I thought the VRH and VRL pins were the VREF.&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Furthermore in diagram 23.5 you can see VREFL on both ADC muxs.&amp;nbsp; There is no mention of VREFH, and no indication it must use AN2 or AN6.&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Lastly the VRH and VRL pins are called out as the VREF pins in the signal diagrams!&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Would you happen to know how AN2/6&amp;nbsp;applies to the Errata?&amp;nbsp; Do I still need to tie the VRH and VRL pins to VDDA and VDDS?&amp;nbsp; Or do I only need to tie AN2/AN6?&amp;nbsp; Or both?&amp;nbsp; According to the errata if I don't do this correctly the ADC is going to randomly spit out bogus values :/&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;As for the internal reference, I have to believe one exists from my results.&amp;nbsp; I do appreciate the reply.&amp;nbsp; I am just frustrated, and often feel as though I am the first person ever to be utilizing the peripherals on freescale parts &lt;IMG alt=":smileytongue:" class="emoticon emoticon-smileytongue" id="smileytongue" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-tongue.gif" title="Smiley Tongue" /&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Aug 2008 04:46:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/MCF5213-ADC-Disaster/m-p/177300#M7016</guid>
      <dc:creator>Juason</dc:creator>
      <dc:date>2008-08-01T04:46:12Z</dc:date>
    </item>
    <item>
      <title>Re: MCF5213 ADC Disaster</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/MCF5213-ADC-Disaster/m-p/177301#M7017</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;FONT size="3"&gt;Update:&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="3"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="3"&gt;Freescale support got back to me regarding this issue.&amp;nbsp; They believe there is no internal ADC Vref and acknowledged the data sheet is incorrect.&amp;nbsp;&amp;nbsp;They were not able to explain why&amp;nbsp;the part is scaling to&amp;nbsp;3.3V off a 3.0V reference using the VRH and VRL pins, and&amp;nbsp;I do not have AN2/AN6 hooked up for comparison.&amp;nbsp; So that will have to remain a mystery....&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="3"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="3"&gt;They said the CAL register actually selects between external references provided at VRH/VRL and AN2/AN6.&amp;nbsp; While that logically makes no sense, it does mimic the behavior I have seen.&lt;/FONT&gt;&lt;/DIV&gt;&lt;P&gt;&lt;FONT size="3"&gt;SEL_VREFH -0 VRH -1 AN2&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;SEL_VREFL -0 VRL -1 AN6&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;They were not entirely&amp;nbsp;sure about the&amp;nbsp;+3.1V vref&amp;nbsp;errata and how it applied to the MCF5213.&amp;nbsp;&amp;nbsp; They said the errata does apply to the MCF5213, but could possibly not affect the AN2/AN6 pins.&amp;nbsp; So when using the 5213 you will need to use a 3.1 to 3.2 V vref, only.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;I hope this offers some clarity for anyone else facing this problem in the future.&lt;/FONT&gt;&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Aug 2008 20:56:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/MCF5213-ADC-Disaster/m-p/177301#M7017</guid>
      <dc:creator>Juason</dc:creator>
      <dc:date>2008-08-04T20:56:46Z</dc:date>
    </item>
  </channel>
</rss>

