Hi,
using the example from STM32 Temperature Sensor I was able to create a working program that displayed the MCU die temperature in degrees Celsius every second.
After measuring the duration of the sensor_sample_fetch() function, it turned out to be about 400 us. In the nRF52832 Product Specification, the duration of temperature measurement is 36 us so I guess that there is a problem here, because the measurement time should not be an order of magnitude greater than in the specification, even despite the use of drivers.I thought that since the previous function fetch all channels, I would try to use sensor_sample_fetch_chan(), which may reduce the function duration, but the timing result was the same as using sensor_sample_fetch().
Should sensor_sample_fetch() really take so long, or can't it be shortened in some way?
I care about efficient operation and low power consumption of the device I am developing so I am very concerned about reducing the temperature measurement time.
Without using any drivers the function duration is as expected and takes no more than 40 us. In the future I plan to add BT communication to the project so I can't use this solution because it conflicts with Soft Device.
Using NRFX drivers the function duration is also about 40 us, but I can't use them either for the reason mentioned above.