<?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: LPC55S28 chip - reading temperature sensor</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S28-chip-reading-temperature-sensor/m-p/2047242#M57716</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/246974"&gt;@omersh649&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;For ADC read temperature code, I recommend you firstly&amp;nbsp; refer to the LPCxpresso55s69 SDK demo "lpadc_temperature_measurement". This demo shows&amp;nbsp; how to measure the temperature within the internal sensor.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="11122.jpg" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/324755i6C8CCA0E231420DA/image-size/large?v=v2&amp;amp;px=999" role="button" title="11122.jpg" alt="11122.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;You can contact me if still have issue after refer to it.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;BR&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Alice&lt;/SPAN&gt;&lt;/P&gt;
&lt;DIV id="tinyMceEditorAlice_Yang_0" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 19 Feb 2025 10:36:20 GMT</pubDate>
    <dc:creator>Alice_Yang</dc:creator>
    <dc:date>2025-02-19T10:36:20Z</dc:date>
    <item>
      <title>LPC55S28 chip - reading temperature sensor</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S28-chip-reading-temperature-sensor/m-p/2046382#M57705</link>
      <description>&lt;P&gt;I am trying to read the chip temperature sensor.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried using the LPADC component in order to read the sensor. I realized I had to disable the power down, enable the kclock_adc0 and attach a clock to it in order to calculate the analog value for the ADC.&lt;/P&gt;&lt;P&gt;The clock-Enable-Clock function doesn't work for&amp;nbsp;kclock_adc0 for some reason (always returning 0). Even though&amp;nbsp;kclock_adc0 exists in FSL clock header file.&amp;nbsp;&lt;/P&gt;&lt;P&gt;clock-Enable-Clock function works in other files for other clocks.&lt;/P&gt;&lt;P&gt;Maybe I need to enable another clock before the ADC clock?&lt;/P&gt;&lt;P&gt;Maybe there should be an additional action before that prevents this from working now?&lt;/P&gt;&lt;P&gt;I then tried to just communicate with any channel of the ADC, and not specifically channel 26 for temperature. I didn't manage to do it as well.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any example code of how to communicate with the ADC and use it in order to read the temperature sensor in the chip?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am attaching the file I wrote for that. I call the initialization function in main, and then I call the HAL-read-CPU-temperature function in another file when the get temperature API is being called.&lt;/P&gt;&lt;P&gt;The clock-enable-Clock(kclock_adc0 ) doesn't work in the initialization function, always returning 0.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please review the code I added in the txt file and advice how to continue from here in 2 aspects:&lt;/P&gt;&lt;P&gt;- Communication with the LPADC and its channels, including the power on, clocks and configurations for the temperature sensor.&lt;/P&gt;&lt;P&gt;- Converting the digital value the ADC returns. What is the value that it returns and how to convert it to Celsius degrees.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Something must be incorrect with my code.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Omer.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Feb 2025 13:11:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S28-chip-reading-temperature-sensor/m-p/2046382#M57705</guid>
      <dc:creator>omersh649</dc:creator>
      <dc:date>2025-02-18T13:11:29Z</dc:date>
    </item>
    <item>
      <title>Re: LPC55S28 chip - reading temperature sensor</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S28-chip-reading-temperature-sensor/m-p/2047242#M57716</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/246974"&gt;@omersh649&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;For ADC read temperature code, I recommend you firstly&amp;nbsp; refer to the LPCxpresso55s69 SDK demo "lpadc_temperature_measurement". This demo shows&amp;nbsp; how to measure the temperature within the internal sensor.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="11122.jpg" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/324755i6C8CCA0E231420DA/image-size/large?v=v2&amp;amp;px=999" role="button" title="11122.jpg" alt="11122.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;You can contact me if still have issue after refer to it.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;BR&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Alice&lt;/SPAN&gt;&lt;/P&gt;
&lt;DIV id="tinyMceEditorAlice_Yang_0" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Feb 2025 10:36:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S28-chip-reading-temperature-sensor/m-p/2047242#M57716</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2025-02-19T10:36:20Z</dc:date>
    </item>
  </channel>
</rss>

