2020-12-22 03:52 AM
2020-12-23 01:23 AM
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