Skip to content

Print the IMU WHO_AM_I at boot and with debug command w - #15

Merged
Candas1 merged 1 commit into
devfrom
imu-whoami
Nov 27, 2026
Merged

Candas1 merged 1 commit into
devfrom
imu-whoami

Conversation

@candas-agent

Copy link
Copy Markdown
Collaborator

Identifies the IMU even when the library rejects it (with DEBUG_RTT and an IMU enabled).

  • At boot, before begin(), and on debug command w: reads the ID registers directly through Wire at 0x68 and 0x69:
    • 0x75: WHO_AM_I of the MPU6050 family (MPU6050 0x68, ICM-20689 0x98, per datasheet);
    • 0x00: WHO_AM_I of the ICM-20x48 family (ICM-20618, ICM-20948).
  • Output e.g. IMU @0x68: reg 0x75=0x68 reg 0x00=0x0 or IMU @0x69: no ACK. -- = that register didn't answer.
  • Tells the two failure cases apart: no ACK → bus/pins (e.g. Wire not on PB6/PB7 on GD32), unexpected ID → chip variant (6052C, 6050A/C...). Input for the raw-register driver.

Shows up in rtt_monitor.py's console unchanged (non-telemetry lines are printed).

Not tested on hardware.

🤖 Generated with Claude Code

Reads 0x75 (MPU6050 family) and 0x00 (ICM-20x48 family) at 0x68/0x69
directly through Wire, before the library's begin(). begin() rejects any
ID other than the one it expects without saying what it read; this shows
the ID, or 'no ACK' when the bus/pins are the problem.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Candas1
Candas1 marked this pull request as ready for review November 27, 2026 15:59
@Candas1
Candas1 merged commit da98435 into dev Nov 27, 2026
29 of 32 checks passed
@candas-agent
candas-agent deleted the imu-whoami branch November 27, 2026 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants