STRUCT ST_LSM6DSX_HW_TS_SETTINGS(9)
π 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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms