<?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>Use temperature in Eddystone (TLM)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/15785/use-temperature-in-eddystone-tlm</link><description>Hello Everyone, 
 How could I use the temperature from nrf_temp.h in the Eddystone (TLM) example? 
 Eddystone (TLM) example: 
 &amp;lt;nRF5_SDK_v11_0_0 folder&amp;gt;\examples\ble_peripheral\experimental_ble_app_eddystone\
 
 Thanks!</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 19 Aug 2016 09:05:29 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/15785/use-temperature-in-eddystone-tlm" /><item><title>RE: Use temperature in Eddystone (TLM)</title><link>https://devzone.nordicsemi.com/thread/60244?ContentTypeID=1</link><pubDate>Fri, 19 Aug 2016 09:05:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:70b8af91-8b5a-4dae-a48b-23a31f8b9919</guid><dc:creator>Nitram</dc:creator><description>&lt;p&gt;Thanks, that is what i have looking for. Now, I want to send the temperature. Therefore, I have to make 8.8 fixed-point notation (&lt;a href="https://courses.cit.cornell.edu/ee476/Math/)"&gt;courses.cit.cornell.edu/.../)&lt;/a&gt;. I have try it, but it does not work.
I have program following code:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;int32_t	temp;
float	temp_f;
int 	temp_i;

sd_temp_get(&amp;amp;temp);			//get temperature

temp_f =  (((float) temp) / 4);		//temperature from 0.25 degrees Celsius to 1 degrees Celsius

temp_i = ((int)((temp_f)*256.0)); 	//Convert float to fix
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Maybe you could help me a second time. Thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Use temperature in Eddystone (TLM)</title><link>https://devzone.nordicsemi.com/thread/60245?ContentTypeID=1</link><pubDate>Wed, 17 Aug 2016 07:53:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d42fbe68-459c-4450-af33-d1b86b727b5e</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;sorry forgot about that, my bad. This module is restricted so you cannot directly access it when softdevice is enabled. You have to use sd_temp_get which is a softdevice API and you can find it in nrf_soc.h.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;/**@brief Get the temperature measured on the chip
 * 
 * This function will block until the temperature measurement is done.
 * It takes around 50us from call to return.
 *
 * @param[out] p_temp Result of temperature measurement. Die temperature in 0.25 degrees celsius.
 *
 * @retval ::NRF_SUCCESS A temperature measurement was done, and the temperature was written to temp
 */
SVCALL(SD_TEMP_GET, uint32_t, sd_temp_get(int32_t * p_temp));
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The value returned by this function is the direct value read from the chip NRF_TEMP-&amp;gt;TEMP register. You can use this API even when you have RC clock with calibration on triggered by temp changes.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Use temperature in Eddystone (TLM)</title><link>https://devzone.nordicsemi.com/thread/60243?ContentTypeID=1</link><pubDate>Wed, 17 Aug 2016 07:17:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8f5f5259-b638-435b-9f29-d2f383bb9d09</guid><dc:creator>Nitram</dc:creator><description>&lt;p&gt;Thanks, but is it possible to combine the temperature measurement with the oscillator?&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;nrf_clock_lf_cfg_t clock_lf_cfg = 
{
    .source = NRF_CLOCK_LF_SRC_RC,
    .rc_ctiv = 16, // Interval in 0.25 s, 16 * 0.25 = 4 sec
    .rc_temp_ctiv = 2, // Check temperature every .rc_ctiv, but calibrate every .rc_temp_ctiv 
    .xtal_accuracy = NRF_CLOCK_LF_XTAL_ACCURACY_250_PPM,
};
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Use temperature in Eddystone (TLM)</title><link>https://devzone.nordicsemi.com/thread/60242?ContentTypeID=1</link><pubDate>Wed, 17 Aug 2016 07:03:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3c706b95-0d4a-4519-a495-4f3dccfbfe1d</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;please look into the example of temperature sensor in&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;nRF5_SDK_v11_0_0 folder&amp;gt;\examples\peripheral\temperature\main.c\
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;to understand how you can use the API in nrf_temp.h&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>