Overview

Driver for Bosch Sensortec BMA250 3-axis accelerometer.

Resources

Web page

http://www.bosch-sensortec.com/en/homepage/products_3/3_axis_sensors/acceleration_sensors/bma250_1/bma250

Datasheet

http://ae-bst.resource.bosch.com/media/products/dokumente/bma250/BST-BMA250-DS002-05.pdf

Test hardware

This code has been tested using an Olimex STM32-405STK:

https://www.olimex.com/Products/ARM/ST/STM32-405STK/

Specification
Parameter Supported settings
Bandwidth (Hz) 8, 16, 31, 63, 125, 250, 500, 1000
Range (g) ±2, ±4, ±8, ±16
Communication up to 400 kHz (I2C) and 10 MHz (SPI)

API Summary

Macros
BMA250_I2C_ADDR BMA250 8-bit I2C address
Functions
bma250_initialize_i2c Initialize sensor on I2C bus
bma250_initialize_spi Initialize sensor on SPI bus
bma250_read_chip_id Read chip ID register
bma250_read_die_temperature Read temperature