cancel
Showing results for 
Search instead for 
Did you mean: 

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

JChoi.6
Associate

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

4 REPLIES 4
Mike_ST
ST Employee

Hello,

could you please share the .ioc file ?

JChoi.6
Associate

Hello?

This is the file you requested.

Mike_ST
ST Employee

Thank you,

Ticket entered.

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

Pavel A.
Evangelist III

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