I have seen similar threads but my scenario is a little different.
I am using the ICM 20948 mounted to a generic prototyping shield and the SPI connections wires soldered to the correct pins. CS is pin 2. The shield is installed on a UNO R4 Minima and has been working fine.
I just removed the SparkFun SD module that was on I2C, and replaced it with an Adafruit 254 SD module on SPI. I have used this module before and have it wired with CS on pin 10.
Now when I run my sketch the initialization of the ICM 20948 says “Wrong ID”.
I can only guess there is some collision in the libraries or how SPI is getting shared. Unfortunately I don’t know enough about that to figure out what the problem could be.
I have absolutely no idea how I would verify the libraries are compatible. I don’t even know where I would start.
Has anyone got this ICM to work with a SPI connected SD card module?
I see this:
#include “ICM_20948.h” // Click here to get the library: http://librarymanager/All#SparkFun_ICM_20948_IMU #define USE_SPI // Uncomment this to use SPI #define SPI_PORT SPI // Your desired SPI port. Used only when “USE_SPI” is defined #define CS_PIN 2 // Which pin you connect CS to. Used only when “USE_SPI” is defined