Using sensor shell with the internal die temp sensor

I am using SDK 3.1.1.  I am trying to use the "sensor get" command with the internal die temp sensor.

In theory, this is all off the shelf software.  I didn't write anything.

The sensor is enabled in the device tree.  It shows up in the 'device list' command.

It does not work with the 'sensor get' command.

I have tried several combinations of settings for some k config values:

 CONFIG_TEMP_NRF5=y

CONFIG_TEMP_NRF5_MPSL=n

CONFIG_NRFX_TEMP=y

Nothing seems to work.  If I comment out the error checking in the sensor_shell.c, it will report the temperature correctly. I fell like the wrong driver API is being accessed.

What kconfig values should I be using or maybe not using?

  

  • I feel like its a catch-22. 

    If MPSL is enabled, the mpls driver for the temp_die is loaded, NOT the sensor API driver. The sensor shell never sees the temp_die sensor, since when it searches the sensor API segment it is not found.

    If MPLS is disabled, the sensor API driver for the temp_die is correctly loaded. The sensor shell sees the temp_die sensor, but calls to it (using "sensor get") hang. (because mpsl is disabled?)

    Maybe this sensor API driver has never worked for the temp_die sensor?

Related