I2C configuration

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

I2C configuration

189 Views
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 Kudos
1 Reply

166 Views
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 Kudos