A comprehensive Linux Industrial I/O (IIO) driver for the Bosch SMI330 6-axis Inertial Measurement Unit (IMU).
- Introduction
- Features
- Hardware Specifications
- Supported Platforms
- Building and Installation
- Device Tree Configuration
- Usage
- Troubleshooting
- Documentation
- Architecture
- License
The SMI330 is a highly integrated, low-power inertial measurement unit (IMU) that combines precise acceleration and angular rate (gyroscopic) measurements with intelligent on-chip motion-triggered interrupt features. This Linux IIO driver provides a standardized interface for accessing all sensor capabilities through the Industrial I/O subsystem.
- 3-axis accelerometer with configurable ranges: ±2g, ±4g, ±8g, ±16g
- 3-axis gyroscope with configurable ranges: ±125°/s, ±250°/s, ±500°/s
- Temperature sensor with operating range: -40°C to +125°C
- Hardware FIFO with configurable watermark levels
- Multiple communication interfaces: I2C and SPI
- Motion detection and no-motion detection
- Tilt detection
- Self-calibration (Component Re-Trim)
- Self-test functionality
- Soft reset capability
- Auto-operation mode with power management
- Configurable interrupt pins (INT1, INT2)
- Open-drain and push-pull interrupt configuration
- Wake-up source support for system suspend/resume
- Standard Linux IIO interface
- Sysfs attribute support
- Device tree integration
- Power management support with wake-up capability
- Multi-instance support
- Comprehensive error handling
| Parameter | Specification |
|---|---|
| Supply Voltage | 1.71V - 3.6V |
| Interface | I2C (up to 400kHz) / SPI (up to 10MHz) |
| Resolution | 16-bit ADC |
| Operating Temperature | -40°C to +125°C |
| Current Consumption | Low power modes available |
- Linux 6.6.y (Raspberry Pi)
- Linux 6.12.y (Raspberry Pi)
- Clone:
git clone https://github.com/boschmemssolutions/SMI330-Linux-Driver-IIO.git- Copy:
cp -r SMI330-Linux-Driver-IIO/drivers/iio/imu/smi330 linux/drivers/iio/imu/- Kconfig: add
source "drivers/iio/imu/smi330/Kconfig"- Makefile: add
obj-$(CONFIG_SMI330) += smi330/(plus I2C/SPI objects)- Enable:
CONFIG_SMI330[,_I2C,_SPI]+ select interrupt mapping- Add DT node / overlay (
compatible = "bosch,smi330")- Build + deploy:
make Image modules dtbsthen install & boot; verify viadmesg | grep smi330&ls /sys/bus/iio/devices
See Integration Guide for a more comprehensive documentation.
User Space Applications
|
┌─────────────────────────────────────────────────────┐
│ IIO Subsystem │
├─────────────────────────────────────────────────────┤
│ sysfs interface │ chardev │ buffer interface │
└─────────────────────────────────────────────────────┘
|
┌─────────────────────────────────────────────────────┐
│ SMI330 IIO Driver │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │ smi330_core │ │ smi330_i2c │ │ smi330_spi │ │
│ └─────────────┘ └─────────────┘ └─────────────┘ │
└─────────────────────────────────────────────────────┘
|
┌─────────────────────────────────────────────────────┐
│ Hardware Abstraction Layer │
│ I2C Subsystem │ SPI Subsystem │
└─────────────────────────────────────────────────────┘
|
SMI330 Hardware
See LICENSE for detailed terms.