Skip to main content
JChoi.6
Associate II
November 2, 2021
Question

There is an error in the HAL_I2C_MspInit() function generated by CubeMX.

  • November 2, 2021
  • 4 replies
  • 1215 views

I2C did not work, so I was looking for the cause, and found that there was a missing part in the HAL_I2C_MspInit() function of the stm32f1xx_hal_msp.c file automatically generated by CubeMX, unlike the previous version.

GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;

If I insert the above code, it works normally.

Below is the version information.

CubeMX V6.3.0

MCU Package STM32F1 Series V1.8.4

MCU STM32F103C6Tx

This topic has been closed for replies.

4 replies

Mike_ST
ST Technical Moderator
November 2, 2021

Hello,

could you please share the .ioc file ?

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. 
JChoi.6
JChoi.6Author
Associate II
November 2, 2021

Hello?

This is the file you requested.

Mike_ST
ST Technical Moderator
November 2, 2021

Thank you,

Ticket entered.

Internal ticket number: 116845 (PS: This is an internal tracking number and is not accessible or usable by customers)

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. 
Pavel A.
November 2, 2021

Is it required to specify the speed of alternate function pins for modern STM32s too, or only for F1?