cancel
Showing results for 
Search instead for 
Did you mean: 

How can i interface STTS751 temperature sensor using stm32wb55 and X-nucleo-ks01a3 board and display the temperature on any of the serial monitor

Gk.1
Associate II
 
1 REPLY 1
Eleon BORLINI
ST Employee

Hi @Gk.1​ ,

the STTS751 temperature sensor is already on the IKS01A3 board, so no hardware steps have to be performed.

After downloading the FP-SNS-MOTENVWB1, you can find the app_x-cube-mems1.c file in folder \Projects\P-NUCLEO-WB55.Nucleo\Applications\MOTENV1\MEMS\App.

This file contains two configurable functions that can be called in the main loop,

void MX_MEMS_Init(void)
{
  /* USER CODE BEGIN MEMS_Init_PreTreatment */
  
  /* USER CODE END MEMS_Init_PreTreatment */
 
  /* Initialize the peripherals and the MEMS components */
 
  /* USER CODE BEGIN MEMS_Init_PostTreatment */
  
  /* USER CODE END MEMS_Init_PostTreatment */
}
 
void MX_MEMS_Process(void)
{
  /* USER CODE BEGIN MEMS_Process_PreTreatment */
  
  /* USER CODE END MEMS_Process_PreTreatment */
 
  /* USER CODE BEGIN MEMS_Process_PostTreatment */
  
  /* USER CODE END MEMS_Process_PostTreatment */
}

For configuring the STTS751 you can call the functions that you can find in the Drivers folders \Drivers\BSP\IKS01A3 and \Drivers\BSP\Components\stts751.

For an already-implemented example for the temperature sensor, you can refer to the X-CUBE-MEMS1 function pack, STTS751_TemperatureLimit example in \Projects\STM32F401RE-Nucleo\Examples\IKS01A3\STTS751_TemperatureLimit, or even the DataLogExtended for interfacing with Unicleo-GUI (Projects\STM32F401RE-Nucleo\Examples\IKS01A3\DataLogExtended).

Please let me know if this can be helpful for you, and in this case please select the Best answer flag.

-Eleon