I2C configuration

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

I2C configuration

824 次查看
LavanyaR
Contributor I

Hi,

In our project I2C1 (PTD9 & PTD6) used for EEPROM communication. I2C1 (PTC6 &PTC7) used for RTC communication. Is it possible to configure the same instance twice in single master?

Thank you

0 项奖励
回复
1 回复

801 次查看
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi @LavanyaR 

only one master configuration structure can be used at a time. Let me copy here from the user manual:

lukaszadrapa_0-1705564695387.png

So, there are two options if more slave devices with different settings are used - either deinit and init the driver each time when you need to switch the configuration or set the baud rate and address in runtime as mentioned in the manual. 

If you have the slave devices connected to different pins, it will be even more complicated - you need to change also GPIO configuration. So, deinit and init makes more sense here.

Regards,

Lukas

 

0 项奖励
回复