Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drivers: sensors: bmi270: Add CRT feature support #63015

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Commits on Jun 22, 2024

  1. drivers: sensors: bmi270: Add macros and prototypes for CRT support.

    Fixes: zephyrproject-rtos#62514
    This commit adds the necessary macros and function prototypes to the bmi270
    driver header in order to add support for the CRT,
    Component Retrimming calibration feature.
    It also extends the public API for bmi270,
    exposing the sensors attributes for the CRT feature.
    
    Signed-off-by: Pedro Machado <[email protected]>
    peter-axe committed Jun 22, 2024
    Configuration menu
    Copy the full SHA
    7f980ad View commit details
    Browse the repository at this point in the history
  2. drivers: sensors: bmi270: add bmi270_soft_reset method public

    Fixes: zephyrproject-rtos#62514
    The bmi270 CRT feature requires the soft_reset method.
    The soft reset must be performed by the CRT module,
    after nvm programming. The function, was previously
    embedded in the init function. This commit moves the
    soft reset logic to a new public method:bmi270_soft_reset
    and the init function now calls that method.
    
    Signed-off-by: Pedro Machado <[email protected]>
    peter-axe committed Jun 22, 2024
    Configuration menu
    Copy the full SHA
    99b479b View commit details
    Browse the repository at this point in the history
  3. drivers: sensors: bmi270: Add CRT feature module

    Fixes: zephyrproject-rtos#62514
    Adds support for the bmi270 feature:
    Creates a specific kconfig for the feature.
    Adds a method to run the crt process.
    Adds a method to program the bmi270 nvm.
    Adds a method to enable/disable gain compensation.
    
    Signed-off-by: Pedro Machado <[email protected]>
    peter-axe committed Jun 22, 2024
    Configuration menu
    Copy the full SHA
    3ec2046 View commit details
    Browse the repository at this point in the history
  4. drivers: sensors: bmi270: Add CRT support to sensor_attr_set

    Fixes: zephyrproject-rtos#62514
    This change allows the bmi270 CRT feature methods
    to be called through Zephyr's sensor api.
    Using the sensor_attr_set function, with the following args:
    -SENSOR_ATTR_CALIBRATION-run the crt.
    -BMI270_SENSOR_ATTR_NVM_PROG-save the CRT results in nvm.
    -BMI270_SENSOR_ATTR_GAIN_COMP-enable/disable gain compensation.
    
    Signed-off-by: Pedro Machado <[email protected]>
    peter-axe committed Jun 22, 2024
    Configuration menu
    Copy the full SHA
    a3a3a13 View commit details
    Browse the repository at this point in the history
  5. drivers: sensors: bmi270: Add CRT support to sensor_attr_get

    Fixes: zephyrproject-rtos#62514
    This change allows using sensor_attr_get with SENSOR_ATTR_CALIBRATION
    to retrieve the compensated user-gain updated data of gyroscope.
    Also, it allows checking if CRT has ever been performed.
    
    Signed-off-by: Pedro Machado <[email protected]>
    peter-axe committed Jun 22, 2024
    Configuration menu
    Copy the full SHA
    df52de9 View commit details
    Browse the repository at this point in the history