cancel
Showing results for 
Search instead for 
Did you mean: 

I2C1 pin assignment on PB8/PB9 is removed when SPI1 is enabled in STM32CubeMX v6

yuichiro
Visitor

Overview

After migrating a project from CubeMX v5 to v6 (DB 6.0.150), the pin assignment for I2C1_SCL (PB8) and I2C1_SDA (PB9) is automatically removed when SPI1 is enabled.

This issue did not occur in CubeMX v5, and on real hardware both I2C1 and SPI1 can operate simultaneously.

 

Steps to Reproduce

  1. Open a project created in CubeMX v5 and migrate to CubeMX v6

  2. Assign PB8 → I2C1_SCL, PB9 → I2C1_SDA

  3. Enable SPI1 (Full-Duplex, Master or Slave)

  4. PB8/PB9 immediately lose their I2C1 assignments

  5. In some cases, I2C1 disappears entirely from the .ioc, and MX_I2C1_Init is no longer generated

 

Environment

  • MCU: STM32F103CBTx

  • CubeMX: 6.15.0

  • DB: 6.0.150

  • Firmware Package: STM32CubeF1 v1.8.4 / v1.8.6

  • Previous project created with: CubeMX 5.x (DB 5.x)

 

Requests

  • Please confirm whether this behavior is a known issue

  • Provide any available workaround

2 REPLIES 2
Imen.D
ST Employee

Hello @yuichiro and welcome to the Community,

Please share your ioc file, this will help to reproduce the issue.

I will move this post to the "STM32CubeMX" forum.

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen

Hello @Imen.D ,
Thanks for your reply! I have attached the .ioc file.

(Virus scan in progress ...)