<?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: TeInternal Temperature sensor o/p issue</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/TeInternal-Temperature-sensor-o-p-issue/m-p/503973#M12328</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Amey,&lt;/P&gt;&lt;P&gt;You are right, it is my fault. I used wrong sign.&lt;/P&gt;&lt;P&gt;24°C was my estimation (just personal feeling) of ambient temperature in office.&lt;/P&gt;&lt;P&gt;When I recalculated it again, it gives 15.67°C to me.&lt;/P&gt;&lt;P&gt;Since we use the typical value of VHT(150), the typical value of dVHT and assumed 5V VDDA voltage for calculation, it is still pretty good result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you will need higher accuracy, please use VDDA voltage compensation, and one or rather at least two point calibration of VHT offset and dVHT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I hope it helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a great day,&lt;BR /&gt;RadekS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 18 Apr 2016 09:11:21 GMT</pubDate>
    <dc:creator>RadekS</dc:creator>
    <dc:date>2016-04-18T09:11:21Z</dc:date>
    <item>
      <title>TeInternal Temperature sensor o/p issue</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/TeInternal-Temperature-sensor-o-p-issue/m-p/503968#M12323</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;I want to measure the core temperature for the MC9s12ZCM,&lt;/P&gt;&lt;P&gt;I have enabled Temperature sensor and configured voltage level generated by the temperature sensor is driven to a special channel input of the ADC Converter.&lt;/P&gt;&lt;DIV class="j-rte-table"&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD style=""&gt;&lt;/TD&gt;&lt;TD style=""&gt;/* Temperature sensor/Bandgap voltage enable bit is enabled&amp;nbsp;&amp;nbsp;&amp;nbsp; */&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CPMUHTCTL_HTE = 1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;DIV class="j-rte-table"&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD style=""&gt;&lt;/TD&gt;&lt;TD style=""&gt;/*! Voltage Access Select Bit is toggled to read :&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style=""&gt; &lt;/TD&gt;&lt;TD style=""&gt;*&amp;nbsp;&amp;nbsp; 1) VSEL = 0, internal temp proportional to VHT&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style=""&gt; &lt;/TD&gt;&lt;TD style=""&gt;*&amp;nbsp;&amp;nbsp; 2) VSEL = 1, Bandgap refernce voltage (VBG) &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style=""&gt; &lt;/TD&gt;&lt;TD style=""&gt;*/&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CPMUHTCTL_VSEL = 0;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also configured adc1 channel to read the result of temperature sensor with configuration&lt;/P&gt;&lt;P&gt;Temp Sensor, Internal_0, 4 clock cycles sample time&lt;/P&gt;&lt;P&gt;written {0x00,0xC8,0x00,0x00}, at address 0x00002040&lt;/P&gt;&lt;P&gt;With this configuration, I am getting the raw count for temperature sensor as around 1095:&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Considering the ADC reference voltage as 5V (VADD =5V)&lt;/P&gt;&lt;P&gt;Voltage with count 1095 = 1.33 V (with 12 bit adc)&lt;/P&gt;&lt;P&gt;So, for calculating the physical value of temperature I am referring following formula : &lt;/P&gt;&lt;P&gt;VHT(temp) = VHT(150) - (150 - temp) * dVHT&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;where, as per electrical specification&lt;/P&gt;&lt;P&gt;VHT(150) = 2.33 V&lt;/P&gt;&lt;P&gt;dVHT = 5.05 mv/degree Cel(typical)&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So for temperature range 150 to -40 degree VHT ranges from 2.33 to 1.37 V&lt;/P&gt;&lt;P&gt;But in my case for the adc count are read as 1095, so VHT measured is 1.33V which is not in acceptable range f 1.37V to 2.33 so temperature value is bellow -40 degree.&lt;/P&gt;&lt;P&gt;And I think this is not the valid scenario, Core temperature must not be too low.Please help me to resolve this issue. Let me know if I am missing any configuration&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amey&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Apr 2016 14:16:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/TeInternal-Temperature-sensor-o-p-issue/m-p/503968#M12323</guid>
      <dc:creator>ameykhatavkar</dc:creator>
      <dc:date>2016-04-14T14:16:06Z</dc:date>
    </item>
    <item>
      <title>Re: TeInternal Temperature sensor o/p issue</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/TeInternal-Temperature-sensor-o-p-issue/m-p/503969#M12324</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Anybody, please share your inputs, so that it will help me to resolve the issue asap.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Amey&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Apr 2016 08:57:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/TeInternal-Temperature-sensor-o-p-issue/m-p/503969#M12324</guid>
      <dc:creator>ameykhatavkar</dc:creator>
      <dc:date>2016-04-15T08:57:58Z</dc:date>
    </item>
    <item>
      <title>Re: TeInternal Temperature sensor o/p issue</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/TeInternal-Temperature-sensor-o-p-issue/m-p/503970#M12325</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i recognized that the internal temperature offset and the temperature slope is not corresponding with the datasheet.&lt;/P&gt;&lt;P&gt;I meassured several devices and i always got an offset of 1096-1100 Digits @ about 25C°. The datasheed seems to be wrong.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Apr 2016 10:52:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/TeInternal-Temperature-sensor-o-p-issue/m-p/503970#M12325</guid>
      <dc:creator>axhubner</dc:creator>
      <dc:date>2016-04-15T10:52:34Z</dc:date>
    </item>
    <item>
      <title>Re: TeInternal Temperature sensor o/p issue</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/TeInternal-Temperature-sensor-o-p-issue/m-p/503971#M12326</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Amey,&lt;/P&gt;&lt;P&gt;I suppose that you mean S12ZVMC128 device. Correct?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Small clarification as first:&lt;/P&gt;&lt;P&gt;S12ZVM has three independent temperature sensors. One is part of the voltage regulator (internal_1 - VREG temperature sensor or bandgap (VBG)) and two are parts of ADC modules (Internal_0 - ADC0 temperature sensor and ADC1 temperature sensor).&lt;/P&gt;&lt;P&gt;So, you don’t need CPMUHTCTL for measuring Internal_0 channel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I measured ADC0 and VREG temperature sensors on my MCU and results are 1070 for ADC0_TEMP (Internal_0) and 1353 for VREG_TEMP (Internal_1).&lt;/P&gt;&lt;P&gt;1353 refers to approximately 1.65V and this fits 24°C in our office plus some heating from MCU.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In fact, the temperature sensor based on PN junction is a quite variable source of a signal.&lt;/P&gt;&lt;P&gt;The offset is typically specific per device and slope may also slightly vary between different devices.&lt;/P&gt;&lt;P&gt;From the physical point of view, only the linearity of this sensor is fixed – rather say that nonlinearity is negligible.&lt;/P&gt;&lt;P&gt;So, typically we need some calibration. See more details in our application note AN3031 Temperature Sensor for the HCS08 Microcontroller Family&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.nxp.com/files/microcontrollers/doc/app_note/AN3031.pdf"&gt;http://www.nxp.com/files/microcontrollers/doc/app_note/AN3031.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;and AN3624 S12X Temperature Sensor&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.nxp.com/files/microcontrollers/doc/app_note/AN3624.pdf"&gt;http://www.nxp.com/files/microcontrollers/doc/app_note/AN3624.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It seems that VREG temperature sensor is already calibrated – therefore, you already have “VHT(temp) = VHT(150) - (150 - temp) * dVHT” formula and typical VHT value in the reference manual.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I hope it helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a great day,&lt;BR /&gt;RadekS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Apr 2016 12:17:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/TeInternal-Temperature-sensor-o-p-issue/m-p/503971#M12326</guid>
      <dc:creator>RadekS</dc:creator>
      <dc:date>2016-04-15T12:17:57Z</dc:date>
    </item>
    <item>
      <title>Re: TeInternal Temperature sensor o/p issue</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/TeInternal-Temperature-sensor-o-p-issue/m-p/503972#M12327</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Redek,&lt;/P&gt;&lt;P&gt;Yeah, its S12ZVMC128 device.&lt;/P&gt;&lt;P&gt;Thanks for your comment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have two doubts here - 1. I don't understood, &lt;STRONG&gt;How you have calculated at 1.65V it is 24°C&lt;/STRONG&gt; ? , as per my calculation it is coming as 14°C.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. At ADC0 you have mentioned your results as 1070 counts. Then here, how we can calculate the temperature?&lt;/P&gt;&lt;P&gt;what will be formula for same in this case? or any manual calibration is require in that case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amey&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Apr 2016 12:56:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/TeInternal-Temperature-sensor-o-p-issue/m-p/503972#M12327</guid>
      <dc:creator>ameykhatavkar</dc:creator>
      <dc:date>2016-04-15T12:56:42Z</dc:date>
    </item>
    <item>
      <title>Re: TeInternal Temperature sensor o/p issue</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/TeInternal-Temperature-sensor-o-p-issue/m-p/503973#M12328</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Amey,&lt;/P&gt;&lt;P&gt;You are right, it is my fault. I used wrong sign.&lt;/P&gt;&lt;P&gt;24°C was my estimation (just personal feeling) of ambient temperature in office.&lt;/P&gt;&lt;P&gt;When I recalculated it again, it gives 15.67°C to me.&lt;/P&gt;&lt;P&gt;Since we use the typical value of VHT(150), the typical value of dVHT and assumed 5V VDDA voltage for calculation, it is still pretty good result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you will need higher accuracy, please use VDDA voltage compensation, and one or rather at least two point calibration of VHT offset and dVHT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I hope it helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a great day,&lt;BR /&gt;RadekS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Apr 2016 09:11:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/TeInternal-Temperature-sensor-o-p-issue/m-p/503973#M12328</guid>
      <dc:creator>RadekS</dc:creator>
      <dc:date>2016-04-18T09:11:21Z</dc:date>
    </item>
  </channel>
</rss>

