cancel
Showing results for 
Search instead for 
Did you mean: 

Interface ICM-20948 DMP with STM32F1 [Blue Pill]

Piyoosh
Associate III

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

@TDK 

1 REPLY 1
Andrew Neil
Super User

@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,

https://community.st.com/t5/stm32-mcus-products/configuring-uart-on-stm32f103c8t6-bluepill-kills-connection-to/m-p/668641/highlight/true#M242690

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.

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.