cancel
Showing results for 
Search instead for 
Did you mean: 

How to make the LSM6DSOX run ultra-low-power in production environment?

TSchi.2269
Associate III

Hello all,

I've recently been trying to make the LSM6DSOX run ultra-low-power. However, I can't get it to work. I tried it with the 109V3 dev board in Unico, where I can get it to run at ~15uA. However, when I turn that configuration into a .h (header) file and load it into my project, it does not work. The LSM runs at 170+ uA and doesn't even give interrupts.

Do I have to change the settings of the LSM in my code like:

/* Turn off Sensors */
  lsm6dsox_xl_data_rate_set(&dev_ctx, LSM6DSOX_XL_ODR_OFF);
  lsm6dsox_gy_data_rate_set(&dev_ctx, LSM6DSOX_GY_ODR_OFF);
 
  /* Disable I3C interface */
  lsm6dsox_i3c_disable_set(&dev_ctx, LSM6DSOX_I3C_DISABLE);
 
  /* Enable Block Data Update */
  lsm6dsox_block_data_update_set(&dev_ctx, PROPERTY_ENABLE);
 
  /* Set full scale */
  lsm6dsox_xl_full_scale_set(&dev_ctx, LSM6DSOX_4g);
  lsm6dsox_gy_full_scale_set(&dev_ctx, LSM6DSOX_2000dps);
 
  /* Route signals on interrupt pin 1 */
  lsm6dsox_pin_int1_route_get(&dev_ctx, &pin_int1_route);
  pin_int1_route.mlc1 = PROPERTY_ENABLE;
  lsm6dsox_pin_int1_route_set(&dev_ctx, pin_int1_route);
 
  /* Configure interrupt pin mode notification */
  lsm6dsox_int_notification_set(&dev_ctx, LSM6DSOX_BASE_PULSED_EMB_LATCHED);
 
  /* Set Output Data Rate.
   * Selected data rate have to be equal or greater with respect
   * with MLC data rate.
   */
  lsm6dsox_xl_data_rate_set(&dev_ctx, LSM6DSOX_XL_ODR_26Hz);
  lsm6dsox_gy_data_rate_set(&dev_ctx, LSM6DSOX_GY_ODR_OFF);

Or are these settings included in the .h file I produce from Unico?

Thanks!

2 REPLIES 2
Eleon BORLINI
ST Employee

Hi Tim, the header file you get as Unico output for the MLC contains only the MLC configurations for the .c header. The device settings code can be generated by configuring the Options / Registers or by uploading an .ucf file and then selecting the button in the Options page. But did you already check the MLC examples on Github?

0693W000001pTPVQA2.png

Regards

Thanks Eleon, I already checked them out. I already sent you a private message about it!