What is the best way to put the MCU to sleep mode after taking one shot measurement with VL53L1X?
- June 8, 2023
- 1 reply
- 2699 views
Hello everyone,
I have designed a custom PCB with STM32WB15CC. I am using two sensors (VL53L1X and MPU6050). I am using CR2032 coin cell as a supply and I have big problems with the battery management. The project example is using sequencer and what I want to do is to take a single shot measurement with the VL53L1X sensor and then put the device to sleep until a wakeup command is received via bluetooth characteristics. What is the best way to implement this behavior when using sequencer?
The program behaves as expected when testing on NUCLEO-WB15CC. I first initialize the sensors and then use timer to trigger a function which returns accelerometer values. Then I check if I receive desired threshold values to call VL53L1X measurement. This is implemented in p2p_server_app.c. I would like to call the most convenient function to save power while keeping bluetooth connection alive since I want to wake up the device and do the same steps again when I send a command.
Please see attached files for more information about the design and codes.
Thank you for your time, best regards.
Example Project: STM32_WPAN / BLE_P2PServer
IDE version: STM32CubeIDE.1.12.0
Firmware Wireless binaries: stm32wb1x_BLE_Stack_full_fw from STM32Cube_FW_WB_V1.13.0
VL53L1X API: VL53L1X_API(STSW-IMG007)
