cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L476 I2C open drain with VDDIO2

Silas Valera
Senior
Posted on May 20, 2017 at 01:09

Hi 

I am trying to use STM32L476 with several I2C devices, STM32L4 operates @3.3V whereas one of the I2C device is operating @1.8V - I need to avoid using level shifting hardware, there is provision of VDDIO2 and when used with I2C open drain configuration (w/o any pull up or pull down), I can connect this device directly to the I2C port. 

Can anyone help me how can I do that? Is there any sample schematic I can follow? Can anyone who has used this configuration tell me about his experience please?

Thanks for your help in advance

Silas 

#vddio2 #i2c
4 REPLIES 4
Posted on May 20, 2017 at 01:17

The I2C bus is surely going to need pull-ups? I don't seeing mixing voltages on the same bus being the way to go. I think you'd need to have two buses, one a 3V0 or 3V3, and the other at 1V8.

Do the specs suggest the VIH is workable on the 3V parts as ~1V8?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on May 20, 2017 at 01:48

Hi

Turvey.Clive.002

Thanks for your quick response, I should have added this: yes the device that operates @1.8v is connected on separate I2C instance/bus.I think I can use VDDIO2 = 1.8v and the ports covered under this VDDIO2 are PG[15:2] i.e. port G pins.

I am using STM32CubeMX and trying to configure I2C - I cannot get any I2C instance to use PORT G??!! Is there any manual hack I need to do?

Thanks

Silas

Posted on May 20, 2017 at 02:27

HI 

I could configure I2C instance 3 on Port G - SCL on G7 and SDA on G8 - this is under SMBus two wire interface. I first need to click on PG6 in the pin diagram - use click on I2C3_SMBA to activate the I2C3 on Port G, and then in the configuration drop down for I2C3 - choose SMBus two wire interface and then click on the pin PG6 and choose 'reset state' to NOT use alert mode. 

I think using this configuration and of course external pull ups on SCL and SDA to 1.8V, I should be able to use the I2C device that is working on 1.8V without using level shifting hardware.  Would anyone please confirm this?  Any comment from ST would really be appreciated. 

Thanks

Silas

Posted on May 21, 2017 at 13:05

Open the datasheet of the chosen stm32 and check the alternate function table for i2c pins at the gpios using vddio2. If none, sw i2c by bit bang will be a possible plan B.