2025-06-20 11:47 PM - last edited on 2025-06-21 1:23 AM by Andrew Neil
Hello,
I'm working on a project using STM32F103C8T6 (Blue Pill) with ICM-20948 IMU from InvenSense, connected via I2C. I'm developing the firmware in STM32CubeIDE, and my goal is to enable and use the DMP (Digital Motion Processor) to obtain quaternion data for orientation estimation.
I have configured I2C1 with HAL (standard blocking mode, no DMA/Interrupts yet).Verified communication with the sensor: WHO_AM_I = 0xEA is correct.
I need Correct sequence to use DMP over I2C (non-SPI).Any ST-specific examples or tips for using external DMP sensors like ICM-20948.
Setup Info:
MCU: STM32F103C8T6
IDE: STM32CubeIDE 1.18.0
IMU: ICM-20948 (SparkFun breakout)
Interface: I2C1 (7-bit address 0x68)
Lib Used: Custom HAL-based driver
Goal: Get reliable quaternion or Euler data from DMP
2025-06-21 1:22 AM - edited 2025-06-21 2:08 AM
@Piyoosh wrote:STM32F103C8T6 (Blue Pill) @TDK
Note that the Blue Pill is not an ST product, and will (almost?) certainly not have a genuine STM32 on it.
The forum is littered with posts where this causes all sorts of weird problems; eg,
You would be a lot better off with a genuine ST Nucleo board - which comes with a built-in, genuine ST-Link, and is supported by many examples and full documentation.
@Piyoosh wrote:I need Correct sequence to use DMP over I2C (non-SPI).
That is entirely down to the DMP - it has nothing to do with whatever microcontroller you use.
The DMP neither knows nor cares what microcontroller you use; it just behaves as defined in its manufacturer's documentation - datasheet, etc.
You need to go to Invensense for that - it's nothing to do with ST.
@Piyoosh wrote:Any ST-specific examples
The only ST-Specific part is the STM32's I2C controller.
As you are successfully reading the WHO AM I, you must already have that part OK.
You can find I2C examples in the STM32F1 firmware pack via CubeIDE or CubeMX
Wiki: https://wiki.st.com/stm32mcu/wiki/Getting_started_with_I2C
Again, if you want specific examples & support, you will do better with a Nucleo board.