Die temperature sensor conflict

Hi,

I’m using an nRF52810 with nRF Connect SDK v2.5.1. I want to read the internal temperature sensor. I started from the LBS sample and added NSMS to report the temperature.

I have a concern after reading these two threads:

SW got stuck during reading internal TEMP sensor

 accessing the nRF5340 temperature sensor 

My question is: Is it safe to read the internal temperature sensor from the application as long as I enable CONFIG_TEMP_NRF5_MPSL=y?

I’m not fully sure in which situations MPSL accesses the TEMP peripheral and could cause a conflict. Does MPSL only use the TEMP sensor when LFRC calibration is enabled, or is it used in other cases as well?

Thanks 

Parents Reply
  • Ok thanks I did not see this thread.

    Just to make sure, since I'm using LFXO, I don't see the TEMP register beeing updated. So in this case you suggest to add this thread to my app ?

    K_THREAD_DEFINE(temperature_thread_id, TEMPERATURE_THREAD_STACK_SIZE,
    temperature_thread_entry, NULL, NULL, NULL,
    K_PRIO_COOP(CONFIG_MPSL_THREAD_COOP_PRIO), 0, 0);
    
    
    void temperature_thread_entry(void)
    {
        while (1) {
            mpsl_temperature_get();    
            k_sleep(K_SECONDS(2));
        }
    }

Children
Related