STRUCT ST_LSM6DSX_HW_TS_SETTINGS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct st_lsm6dsx_hw_ts_settings(9) β€” like, the ST IMU hw timer settings era ✨

okay bestie, welcome to the Kernel API Manual πŸŽ€ this whole page is about one lil struct from the ST IMU world and honestly it's giving "tiny but load-bearing" energy πŸ‘‘


✨ NAME ✨

struct st_lsm6dsx_hw_ts_settings β€” the ST IMU hw timer settings πŸ•πŸ’–


🌸 SYNOPSIS 🌸

no cap, here's the whole thing character for character, do not touch:

struct st_lsm6dsx_hw_ts_settings {
    struct st_lsm6dsx_reg timer_en;
    struct st_lsm6dsx_reg hr_timer;
    struct st_lsm6dsx_reg fifo_en;
    struct st_lsm6dsx_reg decimator;
    u8 freq_fine;
    u16 ts_sensitivity;
    u16 ts_trim_coeff;
 };

πŸ¦‹ Members πŸ¦‹

like, every field has a job and they all ate πŸ’…

  • timer_en β€” hw timer enable register info (addr + mask) ⭐
  • hr_timer β€” hw timer resolution register info (addr + mask) πŸŽ€
  • fifo_en β€” hw timer FIFO enable register info (addr + mask) 🌈
  • decimator β€” hw timer FIFO decimator register info (addr + mask) 🧚
  • freq_fine β€” the difference in % of ODR with respect to the typical πŸ™ˆ
  • ts_sensitivity β€” nominal timestamp sensitivity πŸ“βœ¨
  • ts_trim_coeff β€” the coefficient for calculating the calibrated timestamp gain πŸ”₯ this one comes into play when linearizing the formula used to calculate the calibrated timestamp (please see the relevant formula in the AN for the specific IMU, iykyk). for example, in the case of LSM6DSO we have:

πŸ’€ Description πŸ’€

ok so this is the part where the math shows up and it's lowkey iconic 😭

1 / (1 + x) ~= 1 - x (Taylor’s Series) ttrim[s] = 1 / (40000 * (1 +
0.0015 * val)) (from AN5192) ttrim[ns] ~= 25000 - 37.5 * val ttrim[ns]
~= 25000 - (37500 * val) / 1000

so, replacing ts_sensitivity = 25000 and ts_trim_coeff = 37500 🫢

ttrim[ns] ~= ts_sensitivity - (ts_trim_coeff * val) / 1000

literally math that slays βœ¨πŸ”’


🌟 SEE ALSO 🌟

go read the kernel file ./drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h bestie, and then these absolute main characters πŸ‘‘:

  • struct st_lsm6dsx_fifo_ops(9)
  • struct st_lsm6dsx_shub_settings(9)
  • struct st_lsm6dsx_ext_dev_settings(9)
  • struct st_lsm6dsx_settings(9)
  • struct st_lsm6dsx_sensor(9)
  • struct st_lsm6dsx_hw(9)

πŸ’– that's the whole page fr fr, no details skipped, we keep every single one, periodt.

okay bye ily 🫢 this came from ./drivers/iio/imu/st_lsm6dsx, dated October 2026, and it's the struct st_ls..._ts_settings(9) page β€” catch you in the next manpage bestie πŸ’…πŸŽ€

πŸ“¦ where this page comes from