Browse Source

ist8310: fix 16 times average configuration

release/1.12
Daniel Agar 4 years ago
parent
commit
5b44bd67bb
  1. 2
      src/drivers/magnetometer/isentek/ist8310/IST8310.hpp
  2. 6
      src/drivers/magnetometer/isentek/ist8310/iSentek_IST8310_registers.hpp

2
src/drivers/magnetometer/isentek/ist8310/IST8310.hpp

@ -109,7 +109,7 @@ private: @@ -109,7 +109,7 @@ private:
// Register | Set bits, Clear bits
{ Register::CNTL2, 0, CNTL2_BIT::SRST },
{ Register::CNTL3, CNTL3_BIT::Z_16BIT | CNTL3_BIT::Y_16BIT | CNTL3_BIT::X_16BIT, 0 },
{ Register::AVGCNTL, AVGCNTL_BIT::Y_16TIMES | AVGCNTL_BIT::XZ_16TIMES, 0 },
{ Register::AVGCNTL, AVGCNTL_BIT::Y_16TIMES_SET | AVGCNTL_BIT::XZ_16TIMES_SET, AVGCNTL_BIT::Y_16TIMES_CLEAR | AVGCNTL_BIT::XZ_16TIMES_CLEAR },
{ Register::PDCNTL, PDCNTL_BIT::PULSE_NORMAL, 0 },
};
};

6
src/drivers/magnetometer/isentek/ist8310/iSentek_IST8310_registers.hpp

@ -134,10 +134,12 @@ enum CNTL3_BIT : uint8_t { @@ -134,10 +134,12 @@ enum CNTL3_BIT : uint8_t {
// AVGCNTL
enum AVGCNTL_BIT : uint8_t {
// 5:3 Average times for y sensor data. Times of average will be done before switch to next channel
Y_16TIMES = Bit5, // 3’b100 average by 16 times (ODRmax=166Hz)
Y_16TIMES_SET = Bit5, // 3’b100 average by 16 times (ODRmax=166Hz)
Y_16TIMES_CLEAR = Bit4 | Bit3,
// 2:0 Average times for x & z sensor data. Times of average will be done before switch to next channel
XZ_16TIMES = Bit2, // average by 16 times (ODRmax=166Hz)
XZ_16TIMES_SET = Bit2, // average by 16 times (ODRmax=166Hz)
XZ_16TIMES_CLEAR = Bit1 | Bit0,
};
// PDCNTL

Loading…
Cancel
Save