cancel
Showing results for 
Search instead for 
Did you mean: 

How to setup hfmpi2c1 using STM32F446

Lding2025
Visitor

I have enable the hfmpi2c1 in STM32CubeMX tools, but I can find the 

FMPI2C_HandleTypeDef is undefined in the source code.
 
Do we have a demo code to show how to setup and use hfmpi2c1.
 
It's very confuse that the F446 only have one Fast Plus Mode IIC interface.

Lding2025_0-1758166731293.pngLding2025_1-1758166779567.pngLding2025_2-1758166817354.png

 

1 REPLY 1
mƎALLEm
ST Employee

Hello and welcome to the ST community,

I didn't really understood the issue.

I just generated a code with the latest CubeMx version 6.15.0 with I2C in Fast mode + and FMPI2C_HandleTypeDef is defined. 

In the main, this is what I get:

/* Private variables ---------------------------------------------------------*/
FMPI2C_HandleTypeDef hfmpi2c1;

 If I compile the project I don't have any error.

This is my configuration:

mALLEm_0-1758201152756.png

For your last question, I didn't really understand the meaning! Do you mean the number of instances available on that device? if yes, this information is available in the datasheet:

mALLEm_1-1758201334243.png

4xI2C instances are available on that device, only I2C1 features Fast mode/+.

 

 

 

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.