ISM330DHCX WHO_AM_I returned 0x6B yesterday and now reads 0x48 over SPI
Hi, I’m bringing up an ISM330DHCX over SPI on a NUCLEO-F722ZE using STM32CubeIDE and HAL. The sensor is on a SmartElex 9DoF breakout with an MMC5983MA magnetometer.
I’m using the SmartElex 9DoF breakout with the ISM330DHCX and MMC5983MA. Here’s the SmartElex board guide, which shows the pinout and SPI jumper settings.
Yesterday, I connected the breakout with male-to-female jumper wires and successfully read WHO_AM_I as 0x6B (107). Today, the same test first returned 0xFF and now repeatedly returns 0x48 (72), even though HAL_SPI_TransmitReceive() returns HAL_OK. I’ve replaced the jumper wires and tried wiring the module through a breadboard, but the problem persists.
I found similar reports on ST Community, including the same 0x48 reply. One user got 0x6B again after replacing a jumper, but replacing mine didn’t fix it. I haven’t found a fix for my setup.
Wiring and SPI settings
| SmartElex pin | NUCLEO-F722ZE pin |
|---|---|
SCL | PA5 (SPI1 SCK) |
POCI | PA6 (SPI1 MISO) |
SDA | PA7 (SPI1 MOSI) |
ACS | PD14 (active-low chip select) |
3V3, GND | Nucleo 3.3 V and ground |
SPI1 is full-duplex master, Mode 3, 8-bit, MSB-first, with software chip select. ACS starts high, goes low for both bytes, and returns high after the transfer. Here is the read:
uint8_t tx[2] = {0x8F, 0x00}; // Read register 0x0F
uint8_t rx[2] = {0};
HAL_GPIO_WritePin(GPIOD, GPIO_PIN_14, GPIO_PIN_RESET);
HAL_StatusTypeDef status = HAL_SPI_TransmitReceive(&hspi1, tx, rx, 2, 100);
HAL_GPIO_WritePin(GPIOD, GPIO_PIN_14, GPIO_PIN_SET);What I’ve tried
- Replaced the male-to-female jumpers and tried a breadboard. The
WHO_AM_Iread still fails. - Increased the startup wait to 100 ms and initialized
ACShigh. - Reduced the SCK GPIO speed from Very High to Medium, then reduced the SPI clock from about 844 kHz to 422 kHz. The reply still came back as
0x48. - Ran 100 reads without stopping the debugger between transfers. All 100 returned
HAL_OK, and none returned0x6B.
