leka / LekaOS_Explorations

An exploration repo to use as a dirty stage before including in the main LekaOS
Apache License 2.0
2 stars 0 forks source link

Sensors - Add clean mbed + LSM6DSOX example #6

Closed ladislas closed 4 years ago

ladislas commented 4 years ago

now that we know that the nucleo and the LSM6DSOX are working fine, let's build a clean example with mbed and the only the sensor drivers.

It would be nice to compare different drivers and see what works best for us.

YannLocatelli commented 4 years ago

Première comparaison effectuée, je remets ici le contenu de l'analyse et résultat:

Introduction

In order to pick the right driver among proposed list (see README.md in above directory).

Different criteria could be :

Presentation of drivers

YannLocatelli commented 4 years ago

[Criteria] Driver update

Date of writing: 13 May 2020

YannLocatelli commented 4 years ago

[Criteria] Differences in files

Several files were generated in compare folder, they represent differences in code among different drivers files.

Drivers’ names were replaced by numbers in order to simplify:

1 : mbed-ST_LSM6DSOX
3 : github-stm32duino_LSM6DSOX
3_old : github-stm32duino_LSM6DSOX (25 July 2019)

_old refer to a previous version, contemporary of last version of driver on mbed.
(later) refer to current version of the driver.

(Diff in color available with Sublime Text software.)

mbed-ST_LSM6DSOX and github-STMicroelectronics_STMems_Standard_C_drivers

Ressources

mbed-ST_LSM6DSOX commit is similar to commit 88cfaac89e885c2ccbbbf924912230b13be77e4f of github-STMicroelectronics_STMems_Standard_C_drivers , the only difference between both is different I3C value in register but don’t have impact on normal running.

Other differences between last version of both drivers can be seen in history (11 commits ago at this time).

Major differences

Minor differences

YannLocatelli commented 4 years ago

[Criteria] Differences in files

Several files were generated in compare folder, they represent differences in code among different drivers files.

Drivers’ names were replaced by numbers in order to simplify:

1 : mbed-ST_LSM6DSOX
3 : github-stm32duino_LSM6DSOX
3_old : github-stm32duino_LSM6DSOX (25 July 2019)

_old refer to a previous version, contemporary of last version of driver on mbed.
(later) refer to current version of the driver.

(Diff in color available with Sublime Text software.)

mbed-ST_LSM6DSOX and github-stm32duino_LSM6DSOX

Ressources

Major differences

Minor differences

YannLocatelli commented 4 years ago

[Criteria] Modifications to do (mbed compatiblity)

YannLocatelli commented 4 years ago

Conclusion

Pros & Cons

Suggestion

It is a necessity to stay up to date, so driver lsm6dsox_reg.* should be the one provided by manufacturer on github.

A new abstraction layer LSM6DSOXSensor.* can be done based on drivers of mbed and stm32duino versions but also recent add group Basic configuration on ST version on github.
However only relevant functions should be kept and dependencies should be removed.

ladislas commented 4 years ago

fqsdfq