<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Measuring temperature using the sensor in nRF52832</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/116107/measuring-temperature-using-the-sensor-in-nrf52832</link><description>Hello, 
 In an application with the nRF52832, Softdevice and SDK 17.1.0 I try to use the temperature sensor according to the peripheral example. I attach the temperature.c file code. 
 
 However, I have problems executing the nrf_read_temperature() function</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 11 Nov 2024 09:41:15 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/116107/measuring-temperature-using-the-sensor-in-nrf52832" /><item><title>RE: Measuring temperature using the sensor in nRF52832</title><link>https://devzone.nordicsemi.com/thread/509833?ContentTypeID=1</link><pubDate>Mon, 11 Nov 2024 09:41:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a3472b92-f4fd-4018-9958-f521efb506f1</guid><dc:creator>jinvers</dc:creator><description>&lt;p&gt;Ok. Thank you very much.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Joel&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Measuring temperature using the sensor in nRF52832</title><link>https://devzone.nordicsemi.com/thread/509817?ContentTypeID=1</link><pubDate>Mon, 11 Nov 2024 08:40:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3d60ca05-d676-4851-9b36-a5708b6b3113</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Joel,&amp;nbsp;&lt;br /&gt;You are right. The spec stated that &amp;quot;Linearity&amp;nbsp;compensation can be implemented if required by the application.&amp;quot; So yes, calibration maybe needed. But it&amp;#39;s lineal offset so it should straight forward.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Measuring temperature using the sensor in nRF52832</title><link>https://devzone.nordicsemi.com/thread/509515?ContentTypeID=1</link><pubDate>Thu, 07 Nov 2024 16:23:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f3ca90e3-716a-4860-b51c-28171178de51</guid><dc:creator>jinvers</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;Thank you.&lt;br /&gt;The chip is assembled in a PCB and perhapsis measuring some degrees more than ambient. I suppose it will be necessary some calibration or offset compensation.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Joel&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Measuring temperature using the sensor in nRF52832</title><link>https://devzone.nordicsemi.com/thread/509502?ContentTypeID=1</link><pubDate>Thu, 07 Nov 2024 15:20:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4fb95b1b-b276-4974-9373-db7c330752d5</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi, &lt;br /&gt;If you look at the specification you can find that the unit of TEMP peripheral is 0.25oC.&amp;nbsp;112 = 28oC which is quite high, but maybe&amp;nbsp;it&amp;#39;s just because in Spain it is warmer than in Norway?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Measuring temperature using the sensor in nRF52832</title><link>https://devzone.nordicsemi.com/thread/509475?ContentTypeID=1</link><pubDate>Thu, 07 Nov 2024 14:04:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:844f9114-1a12-4268-9248-f22c4d4a2939</guid><dc:creator>jinvers</dc:creator><description>&lt;p&gt;In fact the raw data fluctuates between 104 and 112.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Joel&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Measuring temperature using the sensor in nRF52832</title><link>https://devzone.nordicsemi.com/thread/509474?ContentTypeID=1</link><pubDate>Thu, 07 Nov 2024 14:00:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:31f8f7ba-7d86-4ea2-b3d8-d26e9f03271d</guid><dc:creator>jinvers</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I&amp;#39;m sorry. I sent you the raw data of 115. What is the conversion rate?&lt;br /&gt;Regards,&lt;/p&gt;
&lt;p&gt;Joel&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Measuring temperature using the sensor in nRF52832</title><link>https://devzone.nordicsemi.com/thread/509468?ContentTypeID=1</link><pubDate>Thu, 07 Nov 2024 13:41:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:97eaf39b-ddaf-42e4-abd6-5f580de81308</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Joel,&amp;nbsp;&lt;br /&gt;What&amp;#39;s the raw value you have ?&amp;nbsp;&lt;br /&gt;Could you try to test on a DK ? Do you have another board to test ?&amp;nbsp;&lt;br /&gt;I did a quick test here and got these result of 94 (22.75C)&amp;nbsp;&amp;nbsp;when booting up and it get to 103 (26C) when I breath some breaths on the chip.&amp;nbsp;&lt;br /&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1730986906011v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Measuring temperature using the sensor in nRF52832</title><link>https://devzone.nordicsemi.com/thread/509415?ContentTypeID=1</link><pubDate>Thu, 07 Nov 2024 10:47:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:af1cc154-6898-4b24-b990-85048ddad6ce</guid><dc:creator>jinvers</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Tested. It works.&lt;br /&gt;However, I see a value of 11,5&amp;ordm;C when it should be a value around 20&amp;ordm;C. It&amp;#39;s a high difference. Any calibration proces to be followed?&lt;br /&gt;Regards,&lt;br /&gt;Joel&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Measuring temperature using the sensor in nRF52832</title><link>https://devzone.nordicsemi.com/thread/509331?ContentTypeID=1</link><pubDate>Wed, 06 Nov 2024 22:32:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f0deb55f-8623-4b59-b7e5-b1debe711f0b</guid><dc:creator>jinvers</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Thank you. I will check it tomorrow.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Joel&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Measuring temperature using the sensor in nRF52832</title><link>https://devzone.nordicsemi.com/thread/509291?ContentTypeID=1</link><pubDate>Wed, 06 Nov 2024 15:15:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:27d30789-3da5-4db1-903b-18517b8755ec</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Joel,&amp;nbsp;&lt;br /&gt;If you have a look here:&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/sds_s140/page/SDS/s1xx/sd_resource_reqs/hw_block_interrupt_vector.html"&gt;https://docs.nordicsemi.com/bundle/sds_s140/page/SDS/s1xx/sd_resource_reqs/hw_block_interrupt_vector.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You will find that the TEMP peripheral is &amp;quot;restricted&amp;quot; when the softdevice is active.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;You would need to use softdevice provided API to access it. Please use&amp;nbsp;sd_temp_get() function.&amp;nbsp;&lt;br /&gt;Here is an example code:&amp;nbsp;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;    int temp;
    uint32_t err;
    err=sd_temp_get(&amp;amp;temp);
    APP_ERROR_CHECK(err);
    NRF_LOG_INFO(&amp;quot;temp: %d&amp;quot;,temp);&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;You should call it after the softdevice is enabled.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>