Skip to content

Setting correct batch size #9

@Mahdi-Hosseinali

Description

@Mahdi-Hosseinali

Hi,
I want to read 4 variables (acc, linAcc, gyro, and game rotation vector(GRV)) from BNO080 but having some issues.

The initialization process is

  1. A soft reset
  2. Request the product ID and reset info
  3. Flush out channel 0 and read product ID on channel 2
  4. Flush data on channel 2 by multiple readings
  5. Setting up sensors using setFeatureCommand and following registers:
    Feature flags = 0, sensivity=0, report interval=batch interval=50ms, sensor specific=0
  6. Enabling dynamic calibration

Every 50ms, the MCU reads the imu sensor reports over the i2c until the data length is zero. Based on the reference manual pp80, all the data are reported in batch format so the expectation is to receive a single sensor input report every that has a size of 4(header)+3x9(acc, linAcc, gyro)+11(GRV)=42 bits and any further call from MCU should receive 0 data length until next 50ms.

However, there is always three reports with a total of 243 to 267 data bits. Usually the first and the last reports are less than 42, and the second one is around 170 to 200 bits long. Looking at the data, the second report has multiple readings of each sensor which puts extra load on the MCU and often produces very unrealistic values (such as 50radians/s in gyro while it's sitting on the desk).

Things I have tried:

  1. Setting the batch interval to zero increases the total size of bits to the range of 223 to 300 bits with up to 8 reports.
  2. Increasing the batch interval to 100ms causes larger report bits (up to 307 bits).
  3. Setting feature flag to 8 (keeps the IMU on) does not change anything.

I would appreciate it if you could help me figure out what is wrong with my setting.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions