New-Tech Europe Magazine | Sep 2019 | Digital Edition
This is a tried and trusted means of saving energy in battery-powered systems. In addition to its gyroscope and accelerometer sensors, the LSM6DSO IMU contains a signal conditioning and filter block, a finite state machine (FSM) that can run as many as 16 programs —all sharing a common, configurable output data rate—and a machine learning core. Used together, these resources can generate event detection interrupts for the following conditions: Free fall Wakeup 6DOF orientation Single-click and double-click sensing Activity/inactivity recognition Stationary/motion detection The signal conditioning block applies conversion factors stored in its sensitivity registers to scale the raw sensor data. It then converts the raw IMU sensor data stream into a 16-bit, half-precision floating point (HFP) byte format that the FSM can understand. The IMU’s MEMS sensors (the accelerometers and gyroscopes) along with the two analog-to-digital converters (ADCs) and four filter blocks are shown in Figure 1. The filter blocks are used to convert the analog MEMS sensor signals into filtered digital data streams. The programmable FSM consists of a configuration block and sixteen program blocks. The FSM’s configuration block configures and controls the entire FSM. Each of the FSM’s sixteen program blocks consists of an input selector block and a code block (Figure 2). Both of these blocks are controlled by values written to registers within the IMU. The Input Selector block routes the selected input data from one of the IMU’s internal sensors or from
Figure 1: The LSM6DSO IMU uses two ADCs to convert analog signals from its internal MEMS accelerometers and gyroscopes into digital streams. The ADCs are followed by four digital filters to condition the signals for decision making by the internal FSM and machine learning core and by the host processor. (Image source: STMicroelectronics)
Figure 2: Each of the FSM’s sixteen program blocks in the LSM6DSO IMU consists of an input selector block and a code block. (Image source: STMicroelectronics)
portion of the code block’s memory footprint, a programmable reset vector, and a program counter. Because these are all 8-bit values, each FSM program is limited to 256 bytes. The program block’s instruction section contains the actual FSM program. Program instructions include opcodes for checking sensor inputs against thresholds, checking for zero crossings, and checking timer values for timeout comparisons. The opcodes specify the condition needed to pass from the current FSM state to the next. In addition, there are command opcodes for selecting thresholds and masks stored in the program’s variable data section; for setting the IMU’s sensor hub multiplex selector to connect to one of the four possible external sensors; and
an external sensor connected to the IMU’s sensor hub to the code block. The IMU’s sensor hub can accommodate as many as four additional external sensors such as magnetometers, which are connected to the IMU via an I2C port. The FSM’s code block contains one program for the state machine. The program block’s data section’s fixed portion consists of six bytes that define the number of thresholds, hysteresis, mask, and timer settings for the program. The program block’s variable data section holds the actual threshold, hysteresis, mask, and timer settings for each program as defined by the values stored in the fixed part of the data section. The fixed portion of the data section also defines the size of the variable
18 l New-Tech Magazine Europe
Made with FlippingBook flipbook maker