Page 1 of 1

Disable I2C

Posted: Wed May 31, 2017 1:21 pm
by dandavid3000
Hi,

I'd like to disable I2C in some situations. Is it the correct way to turn it off ?
Code: Select all
      
I2C_Enable(I2C0, false);
GPIO_PinModeSet(SDA_PORT, SDA_BIT, gpioModeDisabled, 0); //Disable SDA
GPIO_PinModeSet(SCL_PORT, SCL_BIT, gpioModeDisabled, 0); //Disable SCL
CMU_ClockEnable(cmuClock_I2C0, false);



Thank you,
Dan

Re: Disable I2C

Posted: Fri Jun 02, 2017 7:22 am
by mstempin
Hi Dan,

By default, the I2C is not enabled, so there is nothing particular to do to disable it.

If you want to do so, you should remove the route of the I2C peripheral to the actual chip pins.

Re: Disable I2C

Posted: Thu Jun 08, 2017 10:15 am
by dandavid3000
Thank you mstempin :D