beals.william

Solved! Sensortile Acellerometer driver change!

Blog Post created by beals.william on Apr 6, 2018

For those that migrated from the Rev 1.2.0 to 1.3.1 Sample code, there appears to be a significant change in how the drivers work that took me quite a while to isolate.  Hoping you find this if you are doing some searching.

 

There are two accelerometers on the SensorTile, one in the LSM6DS3 and one in the LSM303AGR.  For the Rev 1.2.0 SensorTile code, the data collection drivers for the data logging application defaulted to the LSM6DS3 for accelerometer data, for the Rev 1.3.1 SensorTile code, it changed to the LSM303AGR.  I was making API calls to change the full scale value.  Those API calls require you call out the specific chip, so was specifying the LSM6DS3 which worked fine with the Rev 1.2.0 sample code.  When upgrading to the Rev 1.31 code, it appeared my calls to change full scale were not working at all, data was still pegging at the default 2gs.  Obvious solution once isolated was to change the device in the BSP_ACCELERO_Set_FS() call from LSM6DSM_X_0_handle to LSM303AGR_X_0_handle.

Outcomes