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);
}

}

Parents
  • Thank you Prithvi for your answer.

    I thought the because of the low power the die basically ran cold.

    I have the app sleeping using power_manage() in the main loop, the conn interval is every 500ms w/0 latency, and the timer fires every 2 seconds. I would think that, unless I am doing something wrong, it is sleeping more than 90% of the time. I also took of the DEBUG_NRF_USER flag and the SWI connector in case it was doing something that I would not be aware.

Reply
  • Thank you Prithvi for your answer.

    I thought the because of the low power the die basically ran cold.

    I have the app sleeping using power_manage() in the main loop, the conn interval is every 500ms w/0 latency, and the timer fires every 2 seconds. I would think that, unless I am doing something wrong, it is sleeping more than 90% of the time. I also took of the DEBUG_NRF_USER flag and the SWI connector in case it was doing something that I would not be aware.

Children
No Data
Related