Open caternuson opened 3 years ago
Was able to recreate this issue. Everything works via I2C, but magnetometer returns all 0's with SPI.
This appears to be a known "feature" of this sesnor.
Here's the block diagram for the ICM20948 from the datasheet:
Note that the magnetometer is unique in that it is attached to the auxiliary I2C bus. The datasheet also mentions there being a limitation in accessing the auxiliary I2C bus when using SPI mode:
The trick seems to be to configure the serial interface to be "I2C Master Mode" (vs. "Pass-Through Mode"):
The exact details on what this means are still being determined.
Re this thread: https://forums.adafruit.com/viewtopic.php?f=51&t=182699