M5Unit-IMU 0.0.2 git rev:e5b00aa
Loading...
Searching...
No Matches
unit_sh200q_data.hpp File Reference

SH200Q setting enums and measurement data (framework independent) More...

#include <array>
#include <cstdint>

Go to the source code of this file.

Classes

struct  m5::unit::sh200q::Data
 One measurement (14 bytes burst from REG_OUTPUT, little-endian – NOT the MPU byte order) More...
 

Namespaces

namespace  m5
 Top level namespace of M5Stack.
 

Enumerations

enum class  m5::unit::sh200q::AccelRange : uint8_t { G4 , G8 , G16 }
 Accelerometer full scale range (REG_ACC_RANGE bits[1:0], register value = enum) More...
 
enum class  m5::unit::sh200q::GyroRange : uint8_t {
  DPS2000 , DPS1000 , DPS500 , DPS250 ,
  DPS125
}
 Gyroscope full scale range (REG_GYRO_RANGE bits[2:0], register value = enum) More...
 
enum class  m5::unit::sh200q::AccelOdr : uint8_t { HZ1024 , HZ512 , HZ256 , HZ128 }
 Accelerometer output data rate (REG_ACC_CONFIG bits[4:3], normal mode) More...
 
enum class  m5::unit::sh200q::GyroOdr : uint8_t { HZ1000 , HZ500 , HZ250 }
 Gyroscope output data rate (REG_GYRO_CONFIG bits[3:1]) More...
 
enum class  m5::unit::sh200q::GyroDlpf : uint8_t {
  BW250 , BW200 , BW100 , BW50 ,
  BW25
}
 Gyro digital low pass filter (REG_GYRO_DLPF). Bandwidths quoted at the default 500 Hz ODR; they scale with the selected ODR. More...
 

Functions

constexpr float m5::unit::sh200q::accel_res (const AccelRange r)
 G per LSB for each AccelRange.
 
constexpr float m5::unit::sh200q::gyro_res (const GyroRange r)
 dps per LSB for each GyroRange
 
constexpr uint32_t m5::unit::sh200q::gyro_odr_hz (const GyroOdr r)
 Gyroscope ODR in Hz (used to derive the periodic measurement interval)
 

Detailed Description

SH200Q setting enums and measurement data (framework independent)

Enumeration Type Documentation

◆ AccelOdr

enum class m5::unit::sh200q::AccelOdr : uint8_t
strong

Accelerometer output data rate (REG_ACC_CONFIG bits[4:3], normal mode)

Enumerator
HZ1024 

1024 Hz

HZ512 

512 Hz

HZ256 

256 Hz

HZ128 

128 Hz

◆ AccelRange

enum class m5::unit::sh200q::AccelRange : uint8_t
strong

Accelerometer full scale range (REG_ACC_RANGE bits[1:0], register value = enum)

Note
The SH200Q has no +-2G range
Enumerator
G4 

+-4G (8192 LSB/G)

G8 

+-8G (4096 LSB/G)

G16 

+-16G (2048 LSB/G)

◆ GyroDlpf

enum class m5::unit::sh200q::GyroDlpf : uint8_t
strong

Gyro digital low pass filter (REG_GYRO_DLPF). Bandwidths quoted at the default 500 Hz ODR; they scale with the selected ODR.

Enumerator
BW250 

250Hz @500Hz ODR

BW200 

200Hz

BW100 

100Hz

BW50 

50Hz

BW25 

25Hz

◆ GyroOdr

enum class m5::unit::sh200q::GyroOdr : uint8_t
strong

Gyroscope output data rate (REG_GYRO_CONFIG bits[3:1])

Note
The chip also offers 31.25 Hz and 8/16/32 kHz modes; they are not modeled here (the DLPF table differs for the high-speed modes)
Enumerator
HZ1000 

1000 Hz

HZ500 

500 Hz

HZ250 

250 Hz

◆ GyroRange

enum class m5::unit::sh200q::GyroRange : uint8_t
strong

Gyroscope full scale range (REG_GYRO_RANGE bits[2:0], register value = enum)

Warning
Ordered widest first (the register encoding), the REVERSE of the original M5StickC library's Gscale enum
Enumerator
DPS2000 

+-2000 dps (16.4 LSB/dps)

DPS1000 

+-1000 dps (32.8 LSB/dps)

DPS500 

+-500 dps (65.5 LSB/dps)

DPS250 

+-250 dps (131 LSB/dps)

DPS125 

+-125 dps (262 LSB/dps)