<?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>Read Chip Temperature Sensor on nrf52832</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/45795/read-chip-temperature-sensor-on-nrf52832</link><description>Hello, 
 I am trying to read the internal temperature sensor using interrupts (SoftDevice is disabled). This is what I have: 
 #include &amp;quot;nrf_temp.h&amp;quot; #include &amp;quot;nrf_nvic.h&amp;quot; 
 static int32_t g_temp_reading; 
 void TEMP_IRQHandler() { NRF_TEMP-&amp;gt;EVENTS_DATARDY</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 12 Apr 2019 12:08:05 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/45795/read-chip-temperature-sensor-on-nrf52832" /><item><title>RE: Read Chip Temperature Sensor on nrf52832</title><link>https://devzone.nordicsemi.com/thread/181845?ContentTypeID=1</link><pubDate>Fri, 12 Apr 2019 12:08:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eb438bac-0af5-44ca-b24e-594e1fe9b384</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi Alfonso&lt;/p&gt;
&lt;p&gt;You have to enable and set the priority with functions that aren&amp;#39;t using the SoftDevice. Using&amp;nbsp;NVIC_SetPriority() and NVIC_EnableIRQ() instead of the sd_ &amp;quot;versions&amp;quot; should work.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Read Chip Temperature Sensor on nrf52832</title><link>https://devzone.nordicsemi.com/thread/181735?ContentTypeID=1</link><pubDate>Fri, 12 Apr 2019 03:42:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0efc4e7a-5de0-4e07-b14e-687b3bb65c23</guid><dc:creator>alima</dc:creator><description>&lt;p&gt;Hello Simonr,&lt;/p&gt;
&lt;p&gt;In my first post I am enabling &lt;span&gt;DATARDY&lt;/span&gt; inside init() function call with this:&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;code&gt;NRF_TEMP-&amp;gt;INTENSET |= TEMP_INTENSET_DATARDY_Enabled;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;I am also starting a new measurement inside &lt;code&gt;get_temperature()&lt;/code&gt; with this code:&lt;code&gt;&lt;br /&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;code&gt;NRF_TEMP-&amp;gt;TASKS_START = 1;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;But as I stated before, the interrupt handler never gets called. I guess it is because I am not using the softdevice and so these function calls inside init() have no effect:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; sd_nvic_SetPriority(TEMP_IRQn, APP_IRQ_PRIORITY_LOW);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; sd_nvic_EnableIRQ(TEMP_IRQn);&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;But I have tried removing them and still my interrupt handler never gets called. I am having a look to the SDK source code and I am trying to understand how to do this without the softdevice enabled, but it doesn&amp;#39;t seem to be any information about this.&lt;/p&gt;
&lt;p&gt;Can you please let me know what I am doing wrong?&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Alfonso&lt;code&gt;&lt;/code&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Read Chip Temperature Sensor on nrf52832</title><link>https://devzone.nordicsemi.com/thread/181573?ContentTypeID=1</link><pubDate>Thu, 11 Apr 2019 12:02:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9121bede-0e82-4484-94ba-906d324bb1f2</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;The temperature example states:&amp;nbsp;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;/* Busy wait while temperature measurement is not finished, you can skip waiting if you enable interrupt for DATARDY event and read the result in the interrupt. */&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;You have to enable DATARDY in order to read the temperature by using interrupt.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;Simon&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Read Chip Temperature Sensor on nrf52832</title><link>https://devzone.nordicsemi.com/thread/181453?ContentTypeID=1</link><pubDate>Thu, 11 Apr 2019 05:52:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a9b00d8c-ff46-417d-bbb4-0051ffd60577</guid><dc:creator>alima</dc:creator><description>&lt;p&gt;Hi Simonr,&lt;/p&gt;
&lt;p&gt;That&amp;#39;s true, I haven&amp;#39;t enabled the SD, but I am actually trying to read this sensor without SD enabled. Do you know how I can do that? I have been looking into the documentation and couldn&amp;#39;t find anything.&lt;/p&gt;
&lt;p&gt;Thanks in advance.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Alfonso&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Read Chip Temperature Sensor on nrf52832</title><link>https://devzone.nordicsemi.com/thread/180672?ContentTypeID=1</link><pubDate>Mon, 08 Apr 2019 08:57:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3e6ee6d5-712a-42b2-8cb9-3646c4ac6c56</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi Alfonso&lt;/p&gt;
&lt;p&gt;It seems you are calling a few SoftDevice functions, but I don&amp;#39;t see that you have enabled the SoftDevice. Please see the nrf_sdh_enable_request() function in nrf_sdh.c for how to do this.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Read Chip Temperature Sensor on nrf52832</title><link>https://devzone.nordicsemi.com/thread/180537?ContentTypeID=1</link><pubDate>Fri, 05 Apr 2019 14:47:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:68837e86-3518-42c5-a005-521a22f9dec2</guid><dc:creator>alima</dc:creator><description>&lt;p&gt;Hello Simonr,&lt;/p&gt;
&lt;p&gt;Thanks for your reply.&lt;/p&gt;
&lt;p&gt;I have based my implementation on that example. Also, I am calling those functions: first init() and then get_temperature(). I have verified this with GDB. I have set breakpoints for these 3 functions and I see how init() and get_temperature() are called, but &lt;code&gt;TEMP_IRQHandler()&lt;/code&gt; is never called.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Read Chip Temperature Sensor on nrf52832</title><link>https://devzone.nordicsemi.com/thread/180453?ContentTypeID=1</link><pubDate>Fri, 05 Apr 2019 09:16:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ccd29fb3-f5fd-4006-a42a-74a708c0e35f</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Are you calling any of these functions in your main(void) function? I suggest you take a look at our temperature example to see how it is done&amp;nbsp;there. It can be found in this path when you have downloaded our SDK: \nRF5_SDK_15.2.0_9412b96\examples\peripheral\temperature&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>