<?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: LPC55 temperature sensor in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55-temperature-sensor/m-p/1382278#M47275</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I suppose that the temperature sensor measurement description between UM11424 and UM11126 is similar, the method in UM11126 acquires 4 samples, but only last two sample are used. The method in UM11424 acquires 2 samples, but all the&amp;nbsp; two sample are used, the formula is similar only coefficients value are different.&lt;/P&gt;
&lt;P&gt;I suppose that the differential mode is used to sample temperature sensor voltage.&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;XiangJun Rong&lt;/P&gt;</description>
    <pubDate>Tue, 07 Dec 2021 02:45:22 GMT</pubDate>
    <dc:creator>xiangjun_rong</dc:creator>
    <dc:date>2021-12-07T02:45:22Z</dc:date>
    <item>
      <title>LPC55 temperature sensor</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55-temperature-sensor/m-p/1381299#M47236</link>
      <description>&lt;P&gt;Could you please clarify the method of obtaining a temperature reading.&lt;/P&gt;&lt;P&gt;According to the manual, the procedure takes 256 readings of the same input (input 26) (average=128 loop=2), then the temperature is calculated from the difference between the average of the first 128 readings and the average of the last 128 readings.&lt;/P&gt;&lt;P&gt;If it samples the same channel 256 times, why will there be any difference between the first 128 readings and the last 128 readings?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Dec 2021 14:15:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55-temperature-sensor/m-p/1381299#M47236</guid>
      <dc:creator>ianbenton</dc:creator>
      <dc:date>2021-12-03T14:15:41Z</dc:date>
    </item>
    <item>
      <title>Re: LPC55 temperature sensor</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55-temperature-sensor/m-p/1381666#M47258</link>
      <description>&lt;P&gt;Hi, Ian,&lt;/P&gt;
&lt;P&gt;Regarding the formula A*[alpha*(Vbe8-Vbe1)/(Vbe8 + alpha*(Vbe8-Vbe1))] - B, it is an empirical formula. Based on test, after you sample 4 result, then discard the first two samples, and use the last samples and use above formula can get the best temperature result.&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;P&gt;section 39.7.6 Temperature sensor copied from UM11126.pdf&lt;/P&gt;
&lt;P&gt;39.7.6 Temperature sensor&lt;BR /&gt;The ADC has a dedicated input channel for an on-chip temperature sensor. It is mapped&lt;BR /&gt;on channel 26.&lt;BR /&gt;To calculate the temperature, the ADC must be configured to run a specific sequence of&lt;BR /&gt;steps:&lt;BR /&gt;1. Channel 26 corresponds to the temperature sensor.&lt;BR /&gt;2. Configure a command register to sample the temperature sensor channel.&lt;BR /&gt;CMDLT[ADCH] = Temperature Sensor Channel.&lt;BR /&gt;3. The command must be programmed with the following parameters: CMDLT[CTYPE]&lt;BR /&gt;= 0x2, CMDHT[AVGS] = 0x7, CMDHT[LOOP] = 0x3, CMDHT[LWI] = 0x0,&lt;BR /&gt;CMDHT[STS] = 0x7, CMDHT[CMPEN] = 0x0.&lt;BR /&gt;4. Configure a trigger control register to associate it with the temperature sensor&lt;BR /&gt;command: TCTRLT[TCMD] = CMDT.&lt;BR /&gt;5. Trigger a conversion to run the command associated with TCTRLT.&lt;BR /&gt;After running the temperature sensor command, four results (TS[1:4]) are written to the&lt;BR /&gt;FIFO selected with TCTRLT[FIFO_SEL_A]. A specific combination of the lasts two values&lt;BR /&gt;(TS[3] and TS[4]) allows on chip temperature to be calculated through software.&lt;BR /&gt;To convert the temperature sensor conversion results to the on-chip temperature value:&lt;BR /&gt;1. Discard the TS1 and TS2 results, and read the last two conversion results (TS[3] and&lt;BR /&gt;TS[4])].&lt;BR /&gt;2. The first data from step 1 (TS[3]) is called vbe1. The second data (TS[4]) is called&lt;BR /&gt;vbe8.&lt;BR /&gt;3. An equation can be used to convert these results into the final temperature sensor&lt;BR /&gt;reading: A*[alpha*(Vbe8-Vbe1)/(Vbe8 + alpha*(Vbe8-Vbe1))] - B.&lt;BR /&gt;4. Depending on the device revision, following Alpha., A and B values are needed to&lt;BR /&gt;achieve +/- 4 C temperature accuracy. For device revision 0A: Alpha=9.5, A=770 and&lt;BR /&gt;B = 289.4. For device revision 1B: Alpha= 8.5, A=804 and B = 280.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Dec 2021 05:43:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55-temperature-sensor/m-p/1381666#M47258</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2021-12-06T05:43:41Z</dc:date>
    </item>
    <item>
      <title>Re: LPC55 temperature sensor</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55-temperature-sensor/m-p/1382164#M47273</link>
      <description>&lt;P&gt;Firstly, some of the settings are different from the LPC5502 manual (UM11424). Which one is correct?&lt;/P&gt;&lt;P&gt;As CTYPE is set for a differential input, how can the last two readings be different? The results must be the difference in voltage between two inputs, not two readings of two different inputs. Should CTYPE be 0x03 for reading the two inputs separately?&lt;/P&gt;</description>
      <pubDate>Mon, 06 Dec 2021 20:41:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55-temperature-sensor/m-p/1382164#M47273</guid>
      <dc:creator>ianbenton</dc:creator>
      <dc:date>2021-12-06T20:41:55Z</dc:date>
    </item>
    <item>
      <title>Re: LPC55 temperature sensor</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55-temperature-sensor/m-p/1382278#M47275</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I suppose that the temperature sensor measurement description between UM11424 and UM11126 is similar, the method in UM11126 acquires 4 samples, but only last two sample are used. The method in UM11424 acquires 2 samples, but all the&amp;nbsp; two sample are used, the formula is similar only coefficients value are different.&lt;/P&gt;
&lt;P&gt;I suppose that the differential mode is used to sample temperature sensor voltage.&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;XiangJun Rong&lt;/P&gt;</description>
      <pubDate>Tue, 07 Dec 2021 02:45:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55-temperature-sensor/m-p/1382278#M47275</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2021-12-07T02:45:22Z</dc:date>
    </item>
  </channel>
</rss>

