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

how to find out Nordic temperature value while sd is enabled

Hi,

I am using Nrf51822 custom board.

i want to store Nordic temperature value for every 15 minutes .

i dont want to use polling method.

Kindly suggest me how to find out temperature value by interrupt method while sd is enabled.

it will be easy if any sample code is there.

Regards Balaji

Parents
  • The TEMP peripheral is open even when the softdevice is enabled, so reading the temperature can be done by just starting a measurement and waiting for the ready event.

    The SDK provides a very thin wrapper for this, in nrf_temp.h. Combining this with app_timer should make it easy to do what you need. Beware that there are a couple of PANs on the TEMP peripheral.

    Edit: This is no longer correct with S110 version 6.0.0, which blocks the temp sensor due to its internal usage. You'll therefore have to use the sd_temp_get() function.

Reply
  • The TEMP peripheral is open even when the softdevice is enabled, so reading the temperature can be done by just starting a measurement and waiting for the ready event.

    The SDK provides a very thin wrapper for this, in nrf_temp.h. Combining this with app_timer should make it easy to do what you need. Beware that there are a couple of PANs on the TEMP peripheral.

    Edit: This is no longer correct with S110 version 6.0.0, which blocks the temp sensor due to its internal usage. You'll therefore have to use the sd_temp_get() function.

Children
No Data
Related