nuttx/boards
Felipe Moura 300c7363d7 drivers/sensors: add LSM6DS3TR-C uORB driver for the XIAO ESP32-S3
No driver exists for this exact chip. lsm6dsl.c is the closest
register-compatible match but is the deprecated legacy char-device
style; lsm6dso32_uorb.c is the closest uORB-style match but is for a
different chip variant. The new driver borrows lsm6dso32_uorb.c's
structure (dual sensor_lowerhalf_s, raw I2C_TRANSFER helpers) and
lsm6dsl.h's register map -- fixing a bug in the header it was ported
from along the way: LSM6DSL_FIFO_CTRL2_SHIFT is defined as 255 instead
of 0.

Delivery mode is chosen the same way mpu6050 does: kthread polling by
default, or interrupt-driven if the board supplies attach(). Unlike
the earlier lsm6dso32-style design this went through first -- one INT
pin and one activate()/interrupt path per sub-sensor -- the shipped
version uses a single shared INT pin for both, mirroring mpu6050's own
one-handler-one-worker design (#19601) instead. The two-independent-
paths version worked for accel alone but was intermittently broken for
gyro: activate() sometimes never actually turned CTRL2_G on even
though the interrupt-enable bit was written correctly, and other times
the whole console hung -- a real race, never conclusively root-caused
on a serial console with no JTAG available. The LSM6DS3TR-C supports
OR'ing both DRDY_XL and DRDY_G onto one pin via independent enable
bits in that pin's INTn_CTRL register, so there was no need for two
paths in the first place: one ISR times the burst, one HPWORK worker
reads OUT_TEMP_L..OUTZ_H_A (14 contiguous bytes covering temp, gyro
and accel in one I2C transaction) and pushes whichever topic(s) are
currently subscribed. activate() now just flips each sub-sensor's own
bit in the shared register instead of running its own attach.

On the XIAO ESP32-S3 with Seeed's IMU Breakout Board, INT1/INT2 route
to GPIO3/GPIO4 (confirmed from the breakout board's schematic, not
guessed). Only INT1/GPIO3 is wired up, since one pin is now enough;
GPIO4/INT2 is documented as available but unused.

Also: CTRL1_XL's FS_XL bits were never actually written to match the
driver's own software default (4g) -- registration set the in-memory
value but the chip stayed at its 2g reset default until a caller
issued an explicit SNIOC_SETFULLSCALE. register() now writes it.

Validated on the bench, both modes, reproduced across multiple fresh
reboots: WHO_AM_I reads 0x6a, sensor_accel0/sensor_gyro0 stream
continuously. Interrupt mode delivers ~300 samples of each per 6s
window with shared timestamps down to the microsecond between the two
topics per event, confirming both come from the same burst read.

Assisted-by: Claude <noreply@anthropic.com>
Signed-off-by: Felipe Moura <moura.fmo@gmail.com>
2026-08-29 11:11:14 -03:00
..
arm arch/arm/rtl8721f: add watchdog driver support 2026-08-29 00:08:03 +08:00
arm64 fs: rename PSEUDOFS_SOFTLINKS to FS_LINKS 2026-08-27 01:12:33 +08:00
avr !arch/arm: Use r9 as the PIC base register. 2026-08-06 01:38:23 +08:00
dummy
hc/m9s12 !arch/arm: Use r9 as the PIC base register. 2026-08-06 01:38:23 +08:00
mips arch/mips/jz4780: Add HDMI EDID parsing and dynamic display modes 2026-08-29 11:08:25 -03:00
misoc/lm32/misoc !libc/stream: remove CONFIG_LIBC_LONG_LONG and always support long long 2026-05-19 16:21:28 +08:00
or1k/mor1kx/or1k !arch/arm: Use r9 as the PIC base register. 2026-08-06 01:38:23 +08:00
renesas !arch/arm: Use r9 as the PIC base register. 2026-08-06 01:38:23 +08:00
risc-v boards: Refresh lvglterm related defconfig 2026-08-27 18:12:18 +08:00
sim/sim/sim fs: rename PSEUDOFS_SOFTLINKS to FS_LINKS 2026-08-27 01:12:33 +08:00
sparc !libc/stream: remove CONFIG_LIBC_LONG_LONG and always support long long 2026-05-19 16:21:28 +08:00
tricore !sched/clock: remove CONFIG_SYSTEM_TIME64 and always use 64-bit time 2026-05-19 16:21:28 +08:00
x86/qemu/qemu-i486 boards/comments: Remove legacy comments 2026-05-04 12:16:11 -03:00
x86_64/qemu/qemu-intel64 fs: rename PSEUDOFS_SOFTLINKS to FS_LINKS 2026-08-27 01:12:33 +08:00
xtensa drivers/sensors: add LSM6DS3TR-C uORB driver for the XIAO ESP32-S3 2026-08-29 11:11:14 -03:00
z16/z16f/z16f2800100zcog boards/z16: Replace board_app_initialize 2026-05-02 18:36:46 +08:00
z80 boards/comments: Remove legacy comments 2026-05-04 12:16:11 -03:00
.gitignore
Board.mk !tools/mkpasswd: PBKDF2 host tool and ROMFS passwd build integration 2026-07-21 20:19:14 +08:00
boardctl.c !boards/boardctl: Remove BOARDIOC_INIT 2026-05-26 09:57:29 +08:00
CMakeLists.txt cmake: Use NUTTX(_DIR/_BIN_DIR) instead CMAKE(_SRC_DIR/_BIN_DIR) 2026-08-09 11:13:08 -03:00
dummy.c
Kconfig boards/arm/stm32c5: Add nucleo-C562re support 2026-08-27 01:07:10 +08:00
Makefile tools: fix stale archive members surviving a Kconfig-driven CSRCS change 2026-07-28 21:26:03 -03:00