This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How accurate is die temperature using sd_temp_get()

Hi,

I am measuring die temperature of the nRF51822 using sd_temp_get() at the timeout handler of the RTC1 timer every 2 seconds.

I am using the battery service for a quick test.

After dividing the result by 4 I am getting 39 C (0x27 at the master control panel) when the room temperature is 26.

Am I doing something wrong?

Thanks,

This is a piece of my code:

static void battery_level_update(void) { uint32_t err_code; int32_t p_temp; uint8_t temperature;

	err_code = sd_temp_get(&p_temp);
            APP_ERROR_CHECK(err_code);
	temperature = (uint8_t)(p_temp / 4) ;

err_code = ble_bas_battery_level_update(&m_bas, temperature);
if ((err_code != NRF_SUCCESS) &&
    (err_code != NRF_ERROR_INVALID_STATE) &&
    (err_code != BLE_ERROR_NO_TX_BUFFERS) &&
    (err_code != BLE_ERROR_GATTS_SYS_ATTR_MISSING)
)
{
    APP_ERROR_HANDLER(err_code);
}

}

Related