<?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>LPC MicrocontrollersのトピックRe: LPC546XX CPU temperature sensor calibration</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC546XX-CPU-temperature-sensor-calibration/m-p/1066403#M41182</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Lucas,&lt;/P&gt;&lt;P&gt;I think it is okay to use the&amp;nbsp; lpc_adc_basic SDK example to measure the on-chip temperature sensor voltage and figure out the temperature.&lt;/P&gt;&lt;P&gt;I suppose that the on-chip temperature sensor is a high impedance source, I think you'd better set up the sample time longer with the code:&lt;/P&gt;&lt;P&gt;static void ADC_Configuration(void)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; adc_config_t adcConfigStruct;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; adc_conv_seq_config_t adcConvSeqConfigStruct;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/* Configure the converter. */&lt;BR /&gt;#if defined(FSL_FEATURE_ADC_HAS_CTRL_ASYNMODE) &amp;amp; FSL_FEATURE_ADC_HAS_CTRL_ASYNMODE&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; adcConfigStruct.clockMode = kADC_ClockSynchronousMode; /* Using sync clock source. */&lt;BR /&gt;#endif&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;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* FSL_FEATURE_ADC_HAS_CTRL_ASYNMODE */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; adcConfigStruct.clockDividerNumber = DEMO_ADC_CLOCK_DIVIDER;&lt;BR /&gt;#if defined(FSL_FEATURE_ADC_HAS_CTRL_RESOL) &amp;amp; FSL_FEATURE_ADC_HAS_CTRL_RESOL&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; adcConfigStruct.resolution = kADC_Resolution12bit;&lt;BR /&gt;#endif /* FSL_FEATURE_ADC_HAS_CTRL_RESOL */&lt;BR /&gt;#if defined(FSL_FEATURE_ADC_HAS_CTRL_BYPASSCAL) &amp;amp; FSL_FEATURE_ADC_HAS_CTRL_BYPASSCAL&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; adcConfigStruct.enableBypassCalibration = false;&lt;BR /&gt;#endif /* FSL_FEATURE_ADC_HAS_CTRL_BYPASSCAL */&lt;BR /&gt;#if defined(FSL_FEATURE_ADC_HAS_CTRL_TSAMP) &amp;amp; FSL_FEATURE_ADC_HAS_CTRL_TSAMP&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; adcConfigStruct.sampleTimeNumber = 7U;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;//RONG wrote&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately, the on-chip temperature is NOT accurate, the absolute temperature error is +/-5 degree.&lt;/P&gt;&lt;P&gt;Pls refer to the section in data sheet of LPC546xx.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;7.22 Temperature sensor&lt;BR /&gt;The temperature sensor transducer uses an intrinsic pn-junction diode reference and&lt;BR /&gt;outputs a CTAT voltage (Complement To Absolute Temperature). &lt;STRONG&gt;The output voltage&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;varies inversely with device temperature with an absolute accuracy of better than ±5 C&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;over the full temperature range (40 C to +105 C).&lt;/STRONG&gt; The temperature sensor is only&lt;BR /&gt;approximately linear with a slight curvature. The output voltage is measured over different&lt;BR /&gt;ranges of temperatures and fit with linear-least-square lines.&lt;BR /&gt;After power-up, the temperature sensor output must be allowed to settle to its stable value&lt;BR /&gt;before it can be used as an accurate ADC input.&lt;BR /&gt;For an accurate measurement of the temperature sensor by the ADC, the ADC must be&lt;BR /&gt;configured in single-channel burst mode. The last value of a nine-conversion (or more)&lt;BR /&gt;burst provides an accurate result.&lt;/P&gt;&lt;P&gt;&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;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 19 Jun 2020 04:29:01 GMT</pubDate>
    <dc:creator>xiangjun_rong</dc:creator>
    <dc:date>2020-06-19T04:29:01Z</dc:date>
    <item>
      <title>LPC546XX CPU temperature sensor calibration</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC546XX-CPU-temperature-sensor-calibration/m-p/1066402#M41181</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Recently, I have tried to mesure my CPU temperature from the integrated sensor in my LPC54628J512&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-First, I openned the lpc_adc_basic SDK example, to verify that I can read the ADC value. I thinck there is a mistake in the configuration : it's configured with ADC Channel 4, instead on Channel 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Then, I have implemented the conversion in my system and verify that the mesured temperature correspond to reality. I have used calibration values from the DataSheet (&lt;A class="link-titled" href="https://www.nxp.com/docs/en/data-sheet/LPC546XX.pdf" title="https://www.nxp.com/docs/en/data-sheet/LPC546XX.pdf"&gt;https://www.nxp.com/docs/en/data-sheet/LPC546XX.pdf&lt;/A&gt;&amp;nbsp; p142). With theses values I see a big difference.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is my measures:&lt;/P&gt;&lt;P&gt;-my VDDA is 3.32V&lt;/P&gt;&lt;P&gt;-at 0°C &lt;SPAN&gt;± 2°C&lt;/SPAN&gt;, I mesure 700. -&amp;gt; with 12-bit ADC and 3.32V, that represent 700*3.32/4095 = 567 mV&lt;/P&gt;&lt;P&gt;In the datasheet, the value at 0°C is 584 mV (seems equal to my measure but that represent 10°C difference)&lt;/P&gt;&lt;P&gt;-at 28°C ± 2°C, I measure 641,&amp;nbsp;&lt;SPAN&gt;that represent 700*3.32/4095 = 520 mV, this is in the range given in the datasheet&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;So I took it that the slope of -2.04 mV/°C is also false.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;With my measures, I have calculated a slope of -1.69 mV/°C&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I cannot make the experience with more extrem temperatures (the sensor works from -40°C to +105°C) so I think it's possible to improve the accuracy of my results.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Can you take a look at this ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Best regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Lucas TERRIER&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jun 2020 14:52:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC546XX-CPU-temperature-sensor-calibration/m-p/1066402#M41181</guid>
      <dc:creator>lucas3</dc:creator>
      <dc:date>2020-06-18T14:52:04Z</dc:date>
    </item>
    <item>
      <title>Re: LPC546XX CPU temperature sensor calibration</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC546XX-CPU-temperature-sensor-calibration/m-p/1066403#M41182</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Lucas,&lt;/P&gt;&lt;P&gt;I think it is okay to use the&amp;nbsp; lpc_adc_basic SDK example to measure the on-chip temperature sensor voltage and figure out the temperature.&lt;/P&gt;&lt;P&gt;I suppose that the on-chip temperature sensor is a high impedance source, I think you'd better set up the sample time longer with the code:&lt;/P&gt;&lt;P&gt;static void ADC_Configuration(void)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; adc_config_t adcConfigStruct;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; adc_conv_seq_config_t adcConvSeqConfigStruct;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/* Configure the converter. */&lt;BR /&gt;#if defined(FSL_FEATURE_ADC_HAS_CTRL_ASYNMODE) &amp;amp; FSL_FEATURE_ADC_HAS_CTRL_ASYNMODE&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; adcConfigStruct.clockMode = kADC_ClockSynchronousMode; /* Using sync clock source. */&lt;BR /&gt;#endif&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;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* FSL_FEATURE_ADC_HAS_CTRL_ASYNMODE */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; adcConfigStruct.clockDividerNumber = DEMO_ADC_CLOCK_DIVIDER;&lt;BR /&gt;#if defined(FSL_FEATURE_ADC_HAS_CTRL_RESOL) &amp;amp; FSL_FEATURE_ADC_HAS_CTRL_RESOL&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; adcConfigStruct.resolution = kADC_Resolution12bit;&lt;BR /&gt;#endif /* FSL_FEATURE_ADC_HAS_CTRL_RESOL */&lt;BR /&gt;#if defined(FSL_FEATURE_ADC_HAS_CTRL_BYPASSCAL) &amp;amp; FSL_FEATURE_ADC_HAS_CTRL_BYPASSCAL&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; adcConfigStruct.enableBypassCalibration = false;&lt;BR /&gt;#endif /* FSL_FEATURE_ADC_HAS_CTRL_BYPASSCAL */&lt;BR /&gt;#if defined(FSL_FEATURE_ADC_HAS_CTRL_TSAMP) &amp;amp; FSL_FEATURE_ADC_HAS_CTRL_TSAMP&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; adcConfigStruct.sampleTimeNumber = 7U;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;//RONG wrote&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately, the on-chip temperature is NOT accurate, the absolute temperature error is +/-5 degree.&lt;/P&gt;&lt;P&gt;Pls refer to the section in data sheet of LPC546xx.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;7.22 Temperature sensor&lt;BR /&gt;The temperature sensor transducer uses an intrinsic pn-junction diode reference and&lt;BR /&gt;outputs a CTAT voltage (Complement To Absolute Temperature). &lt;STRONG&gt;The output voltage&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;varies inversely with device temperature with an absolute accuracy of better than ±5 C&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;over the full temperature range (40 C to +105 C).&lt;/STRONG&gt; The temperature sensor is only&lt;BR /&gt;approximately linear with a slight curvature. The output voltage is measured over different&lt;BR /&gt;ranges of temperatures and fit with linear-least-square lines.&lt;BR /&gt;After power-up, the temperature sensor output must be allowed to settle to its stable value&lt;BR /&gt;before it can be used as an accurate ADC input.&lt;BR /&gt;For an accurate measurement of the temperature sensor by the ADC, the ADC must be&lt;BR /&gt;configured in single-channel burst mode. The last value of a nine-conversion (or more)&lt;BR /&gt;burst provides an accurate result.&lt;/P&gt;&lt;P&gt;&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;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jun 2020 04:29:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC546XX-CPU-temperature-sensor-calibration/m-p/1066403#M41182</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2020-06-19T04:29:01Z</dc:date>
    </item>
  </channel>
</rss>

