This is an overview of the ADXL345 and the OSS-ECAL offering for the ADXL345. The ADXL345 is a 3-axis acceleration sensor for industrial use manufactured by Analog Devices.
MCU interface : I2C, SPI
CAUTION:Please be sure to refer to the latest version of the Datasheet prior to actual design.
ADXL345
Overview
The ADXL345 is a small, thin, ultralow power, 3-axis accelerometer with high resolution (13-bit) measurement at up to ±16 g. Digital output data is formatted as 16-bit twos complement and is accessible through either a SPI (3- or 4-wire) or I2C digital interface.
The ADXL345 is well suited for mobile device applications. It measures the static acceleration of gravity in tilt-sensing applications, as well as dynamic acceleration resulting from motion or shock. Its high resolution (3.9 mg/LSB) enables measurement of inclination changes less than 1.0°.
Several special sensing functions are provided. Activity and inactivity sensing detect the presence or lack of motion by comparing the acceleration on any axis with user-set thresholds. Tap sensing detects single and double taps in any direction. Free-fall sensing detects if the device is falling. These functions can be mapped individually to either of two interrupt output pins. An integrated memory management system with a 32-level first in, first out (FIFO) buffer can be used to store data to minimize host processor activity and lower overall system power consumption.
Low power modes enable intelligent motion-based power management with threshold sensing and active acceleration measurement at extremely low power dissipation.
The ADXL345 is supplied in a small, thin, 3 mm × 5 mm × 1 mm, 14-lead, plastic package.
The ADXL345-EP supports defense and aerospace applications (AQEC).
Feature
- Ultralow power: as low as 23 μA in measurement mode and 0.1 μA in standby mode at VS = 2.5 V (typical)
- Power consumption scales automatically with bandwidth
- User-selectable resolution
Fixed 10-bit resolution
Full resolution, where resolution increases with g range, up to 13bit
resolution at ±16 g (maintaining 4 mg/LSB scale factor in all g ranges) - Embedded memory management system with FIFO technology minimizes host processor load
- Single tap/double tap detection
- Activity/inactivity monitoring
- Free-fall detection
- Supply voltage range: 2.0 V to 3.6 V
- I/O voltage range: 1.7 V to VS
- SPI (3- and 4-wire) and I2C digital interfaces
- Flexible interrupt modes mappable to either interrupt pin
- Measurement ranges selectable via serial command
- Bandwidth selectable via serial command
- Wide temperature range (−40°C to +85°C)
- 10,000 g shock survival
- Pb free/RoHS compliant
- Small and thin: 3 mm × 5 mm × 1 mm LGA package
Application
- Handsets
- Medical instrumentation
OSS-ECAL specification
API Function
OSS-ECAL API functions are basically assumed to be function calls from a periodic Thread (TASK).
etSTS oADXL345_INIT ( void )
The oADXL345_INIT function is a function to perform the following initial settings of ADXL345 and shift to the measurement mode. Please set the register initial values in user_setting.h in the table below.
– Step1 Data Format Setting
– Step2 Data rate and power mode control Setting
– Step3 Offset-X, Offset-Y, Offset-Z compensation Setting
– Step4 Activity Detection Setting
– Step5 Inactivity Detection Setting
– Step6 Single Tap Setting
– Step7 Double Tap Setting
– Step8 Free-Fall Setting
– Step9 FIFO Setting Setting
– Step10 Interrupt Enable and Mapping Setting
– Step11 Measurement Mode Enable
Label Name | Register | Temporary initial value |
---|---|---|
DATA_FORMAT_INI | DATA_FORMAT | bit7: SELF_TEST_EN = 0 bit6: SPI_MODE = 0 bit5: INT_INVERT = 0 bit4: RESERVED_BIT = 0 bit3: FULL_RES = 1 bit2: JUSTIFY_MODE = 0 bit1: RANGE_SEL1 = 1 bit0: RANGE_SEL0 = 0 |
BW_RATE_INI | BW_RATE | bit4: LOW_POWER_EN = 0 bit3: RATE_SEL3 = 1 bit2: RATE_SEL2 = 0 bit1: RATE_SEL1 = 1 bit0: RATE_SEL0 = 0 |
OFSX_INI | OFSX [15.6 mg/LSB] | 0.0 |
OFSY_INI | OFSY [15.6 mg/LSB] | 0.0 |
OFSZ_INI | OFSZ [15.6 mg/LSB] | 0.0 |
THRESH_ACT_INI | THRESH_ACT [62.5 mg/LSB] | 0.5 |
ACT_INACT_CTL_INI | ACT_INACT_CTL | bit7: ACT_MODE = 0 bit6: ACT_X_EN = 1 bit5: ACT_Y_EN = 1 bit4: ACT_Z_EN = 1 bit3: INACT_MODE = 0 bit2: INACT_X_EN = 1 bit1: INACT_Y_EN = 1 bit0: INACT_Z_EN = 1 |
THRESH_INACT_INI | THRESH_INACT [62.5 mg/LSB] | 0.2 |
TIME_INACT_INI | TIME_INACT [1 sec/LSB] | 5.0 |
THRESH_TAP_INI | THRESH_TAP [62.5 mg/LSB] | 1.5 |
DUR_INI | DUR [625 us/LSB] | 10.0 |
TAP_AXES_INI | TAP_AXES | bit3: SUPPRESS_EN = 0 bit2: TAP_X_EN = 1 bit1: TAP_Y_EN = 1 bit0: TAP_Z_EN = 1 |
Latent_INI | Latent [1.25 ms/LSB] | 20.0 |
Window_INI | Window [1.25 ms/LSB] | 80.0 |
THRESH_FF_INI | THRESH_FF [62.5 mg/LSB] | 0.375 |
TIME_FF_INI | TIME_FF [5 ms/LSB] | 300.0 |
FIFO_MODE | FIFO_CTL bit7-bit6 Select from the following values iFIFO_BYPASS, iFIFO_FIFO, iFIFO_STREAM, iFIFO_TRIGGER | iFIFO_STREAM |
FIFO_TRIGGER | FIFO_CTL bit5 | 0 |
FIFO_SAMPLE | FIFO_CTL bit4-bit0 | 16 |
INT_ENABLE_INI | INT_ENABLE | bit7: DATA_READY_EN = 1 bit6: SINGLE_TAP_EN = 0 bit5: DOUBLE_TAP_EN = 0 bit4: Activity_EN = 0 bit3: Inactivity_EN = 0 bit2: FREE_FALL_EN = 0 bit1: WATER_MARK_EN = 1 bit0: OVER_RUN_EN = 0 |
INT_MAP_INI | INT_MAP | bit7: DATA_READY_INT = 0 bit6: SINGLE_TAP_INT = 0 bit5: DOUBLE_TAP_INT = 0 bit4: Activity_INT = 0 bit3: Inactivity_INT = 0 bit2: FREE_FALL_INT = 0 bit1: WATER_MARK_INT = 0 bit0: OVER_RUN_INT = 0 |
MEASURE_MODE | POWER_CTL Select from the following values iMEASURE, iSLEEP, iAUTO_SLEEP, iSTANDBY | iMEASURE |
WAKEUP_FREQ | POWER_CTL Select from the following values 1 = 1 Hz, 2 = 2 Hz, 4 = 4 Hz, 8 = 8 Hz | 8 |
Return value | etSTS | OSS-ECAL status code | |
eSTS_FIN | Completed successfully | ||
eSTS_ERR_I2C_OBJECT | I2C object selection error | ||
eSTS_ERR_HAL_OTHERS_RUN | Other application is running HAL | ||
eSTS_ERR_HAL_I2C | HAL I2C error | ||
eSTS_ERR_PARAMETER | If the following values are out of range. -2.0 g ≦ OFSX_INI ≦ 2.0 g -2.0 g ≦ OFSY_INI ≦ 2.0 g -2.0 g ≦ OFSZ_INI ≦ 2.0 g 0.0 g ≦ THRESH_ACT_INI ≦ 16 g 0.0 g ≦ THRESH_INACT_INI ≦ 16 g 0 sec ≦ TIME_INACT_INI ≦ 255 sec 0.0 g ≦ THRESH_TAP_INI ≦ 16 g 0 ms ≦ DUR_INI ≦ 159.375 ms 0 ms ≦ Latent_INI ≦ 318.75 ms 0 ms ≦ Window_INI ≦ 318.75 ms 0.0 g ≦ THRESH_FF_INI ≦ 16 g 0 ms ≦ TIME_FF_INI ≦ 1275 ms 1 ≦ FIFO_SAMPLE ≦ 31 FIFO_MODE value other than iFIFO_BYPASS, iFIFO_FIFO, iFIFO_STREAM, or iFIFO_TRIGGER. MEASURE_MODE value other than iMEASURE, iSLEEP, iAUTO_SLEEP, or iSTANDBY. WAKEUP_FREQ value other than 1, 2, 4, or 8. |
etSTS oADXL345_WRITE_ACT( float32 thresh_act_g, uint8 act_ctl )
The oADXL345_WRITE_ACT function is an API function that sets the threshold and action to detect the active state of the ADXL345 accelerometer.
Return value | etSTS | OSS-ECAL status code | |
eSTS_FIN | Completed successfully | ||
eSTS_ERR_I2C_OBJECT | I2C object selection error | ||
eSTS_ERR_HAL_OTHERS_RUN | Other application is running HAL | ||
eSTS_ERR_HAL_I2C | HAL I2C error | ||
eSTS_ERR_PARAMETER | If the following values are out of range. 0.0 g ≦ thresh_act_g ≦ 16 g | ||
Parameter IN | float32 thresh_act_g | Register THRESH_ACT set value | [62.5 mg/LSB] |
uint8 act_ctl | Register ACT_INACT_CTL set value | bit7 ACT ac/dc bit6 ACT_X enable bit5 ACT_Y enable bit4 ACT_Z enable bit3 INACT ac/dc bit2 INACT_X enable bit1 INACT_Y enable bit0 INACT_Z enable |
etSTS oADXL345_WRITE_INACT( float32 thresh_inact_g, float32 time_inact_s, uint8 inact_ctl )
The oADXL345_WRITE_INACT function is an API function that sets the threshold, time, and action to detect inactivity of the ADXL345 accelerometer.
Return value | etSTS | OSS-ECAL status code | |
eSTS_FIN | Completed successfully | ||
eSTS_ERR_I2C_OBJECT | I2C object selection error | ||
eSTS_ERR_HAL_OTHERS_RUN | Other application is running HAL | ||
eSTS_ERR_HAL_I2C | HAL I2C error | ||
eSTS_ERR_PARAMETER | If the following values are out of range. 0.0 g ≦ thresh_inact_g ≦ 16 g 0 sec ≦ time_inact_s ≦ 255 sec | ||
Parameter IN | float32 thresh_inact_g | Register THRESH_INACT set value | [62.5 mg/LSB] |
float32 time_inact_s | Register TIME_INACT set value | [1 sec/LSB] | |
uint8 inact_ctl | Register ACT_INACT_CTL set value | bit7 ACT ac/dc bit6 ACT_X enable bit5 ACT_Y enable bit4 ACT_Z enable bit3 INACT ac/dc bit2 INACT_X enable bit1 INACT_Y enable bit0 INACT_Z enable |
etSTS oADXL345_WRITE_ST( float32 thresh_g, float32 duration_ms, uint8 axis )
The oADXL345_WRITE_ST function is an API function to set the ADXL345 single-tap detection function.
Return value | etSTS | OSS-ECAL status code | |
eSTS_FIN | Completed successfully | ||
eSTS_ERR_I2C_OBJECT | I2C object selection error | ||
eSTS_ERR_HAL_OTHERS_RUN | Other application is running HAL | ||
eSTS_ERR_HAL_I2C | HAL I2C error | ||
eSTS_ERR_PARAMETER | If the following values are out of range. 0.0 g ≦ thresh_g ≦ 16 g 0 ms ≦ duration_ms ≦ 159.375 ms | ||
Parameter IN | float32 thresh_g | Register THRESH_TAP set value | [62.5 mg/LSB] |
float32 duration_ms | Register DUR set value | [625 us/LSB] | |
uint8 axis | Register TAP_AXES set value | bit3 Suppress bit2 TAP_X enable bit1 TAP_Y enable bit0 TAP_Z enable |
etSTS oADXL345_WRITE_DT( float32 thresh_g, float32 duration_ms, float32 latent_ms, float32 window_ms, uint8 axis )
The oADXL345_WRITE_DT function is an API function to set the ADXL345 double-tap detection function.
Return value | etSTS | OSS-ECAL status code | |
eSTS_FIN | Completed successfully | ||
eSTS_ERR_I2C_OBJECT | I2C object selection error | ||
eSTS_ERR_HAL_OTHERS_RUN | Other application is running HAL | ||
eSTS_ERR_HAL_I2C | HAL I2C error | ||
eSTS_ERR_PARAMETER | If the following values are out of range. 0.0 g ≦ thresh_g ≦ 16 g 0 ms ≦ duration_ms ≦ 159.375 ms 0 ms ≦ latent_ms ≦ 318.75 ms 0 ms ≦ window_ms ≦ 318.75 ms | ||
Parameter IN | float32 thresh_g | Register THRESH_TAP set value | [62.5 mg/LSB] |
float32 duration_ms | Register DUR set value | [625 us/LSB] | |
float32 latent_ms | Register Latent set value | [1.25 ms/LSB] | |
float32 window_ms | Register Window set value | [1.25 ms/LSB] | |
uint8 axis | Register TAP_AXES set value | bit3 Suppress bit2 TAP_X enable bit1 TAP_Y enable bit0 TAP_Z enable |
etSTS oADXL345_WRITE_FF( float32 thresh_mg, float32 time_ms )
The oADXL345_WRITE_FF function is an API function to set the ADXL345 free fall detection function.
Return value | etSTS | OSS-ECAL status code | |
eSTS_FIN | Completed successfully | ||
eSTS_ERR_I2C_OBJECT | I2C object selection error | ||
eSTS_ERR_HAL_OTHERS_RUN | Other application is running HAL | ||
eSTS_ERR_HAL_I2C | HAL I2C error | ||
eSTS_ERR_PARAMETER | If the following values are out of range. 0.0 g ≦ thresh_g ≦ 16 g 0 ms ≦ time_ms ≦ 1275 ms | ||
Parameter IN | float32 thresh_g | Register THRESH_FF set value | [62.5 mg/LSB] |
float32 time_ms | Register TIME_FF set value | [5 ms/LSB] |
etSTS oADXL345_WRITE_OFFSET( float32 offset_x_g, float32 offset_y_g, float32 offset_z_g )
The oADXL345_WRITE_OFFSET function is an API function that sets the offset of the ADXL345 acceleration X-axis-X, Y-axis and Z-axis.
Return value | etSTS | OSS-ECAL status code | |
eSTS_FIN | Completed successfully | ||
eSTS_ERR_I2C_OBJECT | I2C object selection error | ||
eSTS_ERR_HAL_OTHERS_RUN | Other application is running HAL | ||
eSTS_ERR_HAL_I2C | HAL I2C error | ||
eSTS_ERR_PARAMETER | If the following values are out of range. -2.0 g ≦ offset_x_g ≦ 2.0 g -2.0 g ≦ offset_y_g ≦ 2.0 g -2.0 g ≦ offset_z_g ≦ 2.0 g | ||
Parameter OUT | float32 offset_x_g | Register OFSX set value | [15.6 mg/LSB] |
float32 offset_y_g | Register OFSY set value | [15.6 mg/LSB] | |
float32 offset_z_g | Register OFSZ set value | [15.6 mg/LSB] |
etSTS oADXL345_WRITE_INT( uint8 int_enable_mask, uint8 int_map )
The oADXL345_WRITE_INT function is an API function to set ADXL345 interrupt.
Return value | etSTS | OSS-ECAL status code | |
eSTS_FIN | Completed successfully | ||
eSTS_ERR_I2C_OBJECT | I2C object selection error | ||
eSTS_ERR_HAL_OTHERS_RUN | Other application is running HAL | ||
eSTS_ERR_HAL_I2C | HAL I2C error | ||
Parameter IN | uint8 int_enable_mask | Register INT_ENABLE set value | bit7 DATA_READY bit6 SINGLE_TAP bit5 DOUBLE_TAP bit4 Activity bit3 Inactivity bit2 FREE_FALL bit1 Watermark bit0 Overrun |
uint8 int_map | Register INT_MAP set value | bit7 DATA_READY bit6 SINGLE_TAP bit5 DOUBLE_TAP bit4 Activity bit3 Inactivity bit2 FREE_FALL bit1 Watermark bit0 Overrun |
etSTS oADXL345_WRITE_FIFO( uint8 fifo, uint8 samples, uint8 int_map )
The oADXL345_WRITE_FIFO function is an API function to set ADXL345 FIFO.
Return value | etSTS | OSS-ECAL status code | |
eSTS_FIN | Completed successfully | ||
eSTS_ERR_I2C_OBJECT | I2C object selection error | ||
eSTS_ERR_HAL_OTHERS_RUN | Other application is running HAL | ||
eSTS_ERR_HAL_I2C | HAL I2C error | ||
eSTS_ERR_PARAMETER | If the following values are out of range. 1 ≦ samples≦ 31 fifo value other than iFIFO_BYPASS, iFIFO_FIFO, iFIFO_STREAM, or iFIFO_TRIGGER. | ||
Parameter IN | uint8 fifo | Register FIFO_CTL set value | bit7-bit6 FIFO_MODE Select from the following values. iFIFO_BYPASS、iFIFO_FIFO、iFIFO_STREAM、iFIFO_TRIGGER |
uint8 samples | Register FIFO_CTL set value | bit4-bit0 Samples 1 to 31 | |
uint8 int_map | Register INT_MAP set value | bit7 DATA_READY bit6 SINGLE_TAP bit5 DOUBLE_TAP bit4 Activity bit3 Inactivity bit2 FREE_FALL bit1 Watermark bit0 Overrun |
etSTS oADXL345_WRITE_MODE( uint8 mode, uint8 wakeup )
The oADXL345_WRITE_MODE function is an API function to switch between the measurement mode, sleep mode, auto sleep mode, and standby mode of the ADXL345 operation mode.
Return value | etSTS | OSS-ECAL status code | |
eSTS_FIN | Completed successfully | ||
eSTS_ERR_I2C_OBJECT | I2C object selection error | ||
eSTS_ERR_HAL_OTHERS_RUN | Other application is running HAL | ||
eSTS_ERR_HAL_I2C | HAL I2C error | ||
eSTS_ERR_PARAMETER | mode value other than iMEASURE, iSLEEP, iAUTO_SLEEP, or iSTANDBY. wakeup value other than 1, 2, 4, or 8. | ||
Parameter IN | uint8 mode | Register POWER_CTL set value | bit4-bit2 Power mode Select from the following values. iAUTO_SLEEP, iMEASURE, iSLEEP, iSTANDBY |
uint8 wakeup | Register POWER_CTL set value | bit1-bit0 Wakeup Select from the following values. 1, 2, 4, 8 |
etSTS oADXL345_READ_REG( uint8 adr, uint8* val )
The oADXL345_READ_REG function is an API function that reads the value of Register by specifying the ADXL345 Register address and stores the read value in val.
Return value | etSTS | OSS-ECAL status code | |
eSTS_FIN | Completed successfully | ||
eSTS_ERR_I2C_OBJECT | I2C object selection error | ||
eSTS_ERR_HAL_OTHERS_RUN | Other application is running HAL | ||
eSTS_ERR_HAL_I2C | HAL I2C error | ||
Parameter IN | uint8 adr | Register address to be read | |
Parameter OUT | uint8* val | Save the read Register value to val |
etSTS oADXL345_READ_ACC( stACC* axis )
The oADXL345_READ_ACC function first reads the value of the DATA_FORMAT register, then retrieves the values from the DATAX0:DATAX1, DATAY0:DATAY1, and DATAZ0:DATAZ1 registers. Based on the range setting in DATA_FORMAT, it stores the X-axis value in axis.acc_x, the Y-axis value in axis.acc_y, and the Z-axis value in axis.acc_z.
Return value | etSTS | OSS-ECAL status code | |
eSTS_FIN | Completed successfully | ||
eSTS_ERR_I2C_OBJECT | I2C object selection error | ||
eSTS_ERR_HAL_OTHERS_RUN | Other application is running HAL | ||
eSTS_ERR_HAL_I2C | HAL I2C error | ||
Parameter OUT | stACC* axis | DATAX0:DATAX1 is converted by Range and saved in axis.acc_x DATAY0:DATAY1 is converted by Range and saved in axis.acc_y DATAZ0:DATAZ1 is converted by Range and saved in axis.acc_z | [mg] |
etSTS oADXL345_READ_ACC_FIFO( stACC* axis )
The oADXL345_READ_ACC_FIFO function first reads the value of the DATA_FORMAT register, then retrieves the values from the DATAX0:DATAX1, DATAY0:DATAY1, and DATAZ0:DATAZ1 registers based on the FIFO settings. It then stores the X-axis value in axis.acc_x, the Y-axis value in axis.acc_y, and the Z-axis value in axis.acc_z, according to the range setting in DATA_FORMAT.
Return value | etSTS | OSS-ECAL status code | |
eSTS_FIN | Completed successfully | ||
eSTS_ERR_I2C_OBJECT | I2C object selection error | ||
eSTS_ERR_HAL_OTHERS_RUN | Other application is running HAL | ||
eSTS_ERR_HAL_I2C | HAL I2C error | ||
eSTS_ERR_DATA_STALE | If Register FIFO_STATUS Entries > 32. | ||
Parameter OUT | stACC* axis | DATAX0:DATAX1 is converted by Range and saved in axis.acc_x DATAY0:DATAY1 is converted by Range and saved in axis.acc_y DATAZ0:DATAZ1 is converted by Range and saved in axis.acc_z | [mg] |
etSTS oADXL345_SELF_TEST_MODE( uint8 sw )
The oADXL345_SELF_TEST_MODE function is an API function to enable/disable the ADXL345 self-test mode.
Return value | etSTS | OSS-ECAL status code | |
eSTS_FIN | Completed successfully | ||
eSTS_ERR_I2C_OBJECT | I2C object selection error | ||
eSTS_ERR_HAL_OTHERS_RUN | Other application is running HAL | ||
eSTS_ERR_HAL_I2C | HAL I2C error | ||
Parameter IN | uint8 sw | Set value of SELF_TEST bit in Register DATA_FORMAT | sw = iON: Enable self-test mode sw = iOFF: Disable self-test mode |
Sample application
OSS-ECAL contains sample applications in the sample folder. Here is an overview of the application. Please use it as a reference material when incorporating OSS-ECAL into your product programs.

State | vgADXL345_COMMAND | state transition condition | Process Overview | API Function |
---|---|---|---|---|
Initialize | iADXL345_INITIALIZE | 1. First time | Initial Settings for ADXL345 | oADXL345_INIT |
Measure | iADXL345_MEASUREMENT | 1. Initialize completed 2. vgADXL345_COMMAND=iADXL345_MEASUREMENT | -axis acceleration measurement | oADXL345_READ_REG |
Self-test | iADXL345_SELF_TEST | 1. vgADXL345_COMMAND=iADXL345_SELF_TEST | Self-Test | oADXL345_SELF_TEST_MODE |
Calibration | iADXL345_CALIBRATION | 1. vgADXL345_COMMAND=iADXL345_CALIBRATION | Calibration | oADXL345_WRITE_OFFSET oADXL345_WRITE_ST oADXL345_WRITE_DT oADXL345_WRITE_ACT oADXL345_WRITE_INACT oADXL345_WRITE_FF |
Auto-Sleep | iADXL345_AUTO_SLEEP | 1. vgADXL345_COMMAND=iADXL345_AUTO_SLEEP | Auto Sleep | – |
Error | iADXL345_ERROR | 1. vgADXL345_COMMAND=iADXL345_ERROR | Error処理* | -* |
* Please address this in your product program.
HAL Support List
OSS-ECAL’s HAL support is as follows. (The list is being expanded sequentially.) Please note that even if the same HAL is used, different versions, MCUs, and development environments may not work together.
Manufacturer | SDK/IDE Tool | HAL Name | Ver | HALNAME | Support |
---|---|---|---|---|---|
Arduino | Arduino IDE | Arduino | 1.8.6 | ARDUINO | X |
Arm | Keil MDK v6 | Mbed OS | 6.17.0 | MBED | X |
Debian | – | GNU/Linux | 10.3 | Linux | X |
Infineon | ModusToolbox | mtb-hal-cat1 | 2.4.3 | ModusToolbox | X |
NXP | MCUXpresso SDK | SDK_2.x_EVKB-IMXRT1050 | 2.16 | iMXRT1051B1052B | X |
NXP | PlatformSDK_S32K1_2022_02 | AUTOSAR MCAL | 4.4 | MCAL | – |
Renesas | Synergy Software Package | HAL | 2.6.0 | SSP | X |
STMicroelectronics | STM32Cube | STM32CubeF4 | V1.28.1 | STM32F4 | X |
Development environment
The MCU and development environment during OSS-ECAL development are as follows.
HAL Name | Manufacturer | Board | MCU | IDE |
---|---|---|---|---|
ARDUINO | Arduino | 1.Mega 2560 Rev3 2.Arduino Pro Mini 3.3V | ATmega2560 ATmega328P | Arduino IDE 2.3.3 |
MBED | STMicroelectronics | STM32 Nucleo-64 boards | STM32F401RETx | Arm Keil Studio Cloud |
Linux | BeagleBoard | BeagleBone Black | TI AM335x | – |
ModusToolbox | Infineon | CY8CPROTO-063-BLE PSoC 6 BLE Prototyping Kit | CYBLE-416045-02 | ModusToolbox |
iMXRT1051B1052B | NXP | IMXRT1050-EVKB | i.MX RT1050 | MCUXpresso IDE |
MCAL | STMicroelectronics | S32K144EVB-Q100 | S32K144 | S32 Design Studio for S32 Platform |
SSP | Renesas | S7G2 SK | R7FS7G27H3A01CFC | e² studio for Renesas Synergy |
STM32F4 | STMicroelectronics | STM32 Nucleo-64 boards | STM32F401RETx | STM32CubeIDE |
File Structure
Folder* | File | Summary |
---|---|---|
ADXL345_HALNAME_010000/sample | sample.c (.cpp) | Sample application program |
sample.h | Sample application header | |
ADXL345_HALNAME_010000 | oADXL345.c (.cpp) | OSS-ECAL program for ADXL345 |
oADXL345.h | OSS-ECAL header for ADXL345 | |
oss_ecal.h | OSS-ECAL common header | |
ADXL345_ARDUINO.ino | Sample application programs for Arduino | |
user_setting.c (.cpp) | User configured constants and tables | |
user_setting.h | User configuration Header | |
oHAL_i2c_stm32f4.c | HAL Program for STM32Cube FW_F4 | |
oHAL_i2c_stm32f4.h | HAL Header for STM32Cube FW_F4 | |
readme.md | Readme | |
OSS-ECAL Terms of Use.txt | OSS-ECAL Terms of Use |
* For HALNAME, please refer to HAL Support.
OSS-ECAL Download Contact
Please login before contacting us for downloads.
To register as a new user, click here.
Built-in How to
How to incorporate OSS-ECAL into user programs
How to incorporate multiple OSS-ECALs in a user program (same MCU function)
How to incorporate multiple OSS-ECALs in a user program (different MCU function)
How to incorporate multiple identical electronic components into a user program
How to reduce the impact on user programs by replacing electronic components
CAUTION
The sample version of OSS-ECAL is not intended to be used with Threads (Tasks) or interrupts of different priority. Please do not use it as in the example below.
Example: If each sensor is assigned to the same ADC group and the OSS-ECAL API is executed in processes with different priorities, correct values may not be obtained.
ADC Gr0 Ch0 Temperature sensor AD22100A 100ms cycle Thread (low priority) to take in temperature
ADC Gr0 Ch1 Pressure sensor MPX5999D Event interrupts (high priority) to take pressure