cancel
Showing results for 
Search instead for 
Did you mean: 

Getting temperature from ISM330IS in AlgoBuilder

JLamb.3
Associate II

I have successfully built AlgoBuilder-based Firmware for my Target, including using some of the ISPU based examples from the x-cube-ispu GitHub:

NUCLEO-L476RG + X-NUCLEO-IKS02A1 + ISM330IS

We are hoping to replace an old accelerometer and separate temperature sensor chip in our design with the very capable ISM330IS. I'm evaluating it for basic accelerometer, gyro, and temperature sensor use as well as the 6-axis fusion (quaternion outputs)

If I add the "Temperature" block to my SensorHub, I get the error:

Error: Block "Temperature [°C]" requires capability "TemperatureSensor" but current build target does not have this capability!

In my own code, I expect I can just read from OUT_TEMP_L (20h), OUT_TEMP_H (21h) or ISPU_TEMP_L (68A4h), ISPU_TEMP_H (68A5h).

Just curious how to do this directly from AlgoBuilder

3 REPLIES 3
Miroslav BATEK
ST Employee

The temperature sensor in ISM330IS is not primary function of this device. According to the datasheet it can have up to 15°C. That is the reason why it is not exposed as function in the software stack. If you would like to use it you would need to modify HL driver for ISM330IS and BSP driver for X-NUCLEO-IKS02A1 and add this as other temperature sensors.

Thanks, I did see that in the data sheet. Is the +/-15C an absolute accuracy specification that can be accounted for by a simple offset calibration? Or does the temperature vary significantly based on operating mode of the IMU components? Does the temperature sensor have a precision and linearity characterization?

I am new to STM32Cube and AlgoBuilder. Can you point me to where the HL and BSP drivers are located?

Hi @JLamb.3​ ,

Regarding the temperature sensor, the +-15°C is referred to the accuracy inside the full temperature range, and being an offset it is independent across the (so, if you have 2°C offset at 25°C, you'll have about 2°C at 85°C too). The actual temperature is more related to the application pcb temperature than to the component one, which consumes 500uA in the high performance case.

-Eleon