cancel
Showing results for 
Search instead for 
Did you mean: 

STM32U5G9J-DK1: Interfacing a 3.3 V I2C via 3.3 V-to-1.8 V level shifter

RandomGaurav
Associate II

Hello all,

I want to connect a 3.3 V I2C based keypad with STM32U5G9J-DK1 via a carrier board on which the STM32 board sits via expansion connectors CN9 and CN10 present on it. I am using pins PG13, PG14, and PG9 for my I2C SDA, I2C SCL, and INTERRUPT, which are available as Pin No. 4, 2, and 8 respectively on CN10. The signals pass through a level shifter (TXS0104VDR) on the carrier board for conversion between 1.8 V signals at the STM32 end and 3.3 V signals at the keypad end.

These lines are also connected with external pull up resistors as indicated in images attached. All the capacitors between the signal lines and GND have been unmounted. Also, 0 Ohm resistors (R27, R28, and R29 have been unmounted).

During operation, STM32 can't detect any I2C device connected whereas the keypad seems to work perfectly when used in a different setup. Upon further investigation, it appears that all the three pins have become unresponsive, even when the board is used standalone, disengaged from the carrier board. Setting internal pull-ups via STMCube doesn't show up when these pins are probed for the same. Similarly, interrupts aren't detected via STM32 MCU even when interrupts are applied on the pins externally.

I suppose some design flaw is to be blamed for this malfunctioning and I hope you can help me diagnose it.

Screenshot 2026-03-23 113804.png

Screenshot 2026-03-23 113841.png

  

2 REPLIES 2
Andrew Neil
Super User

10k for pull-ups is high - especially when you're adding 100nF of capacitance to each line !

Have you looked at the signals using an oscilloscope?

The TXS0104VDR is a TI product: https://www.ti.com/product/TXB0104 - is it intended for I2C use ?

 

PS:

You have the OE pin biased to half the 3V3 supply - surely it should be either high or low ?

Also, the datasheet says that OE is referenced to VCCA - but you have it on the VCCB side.

Check your TXS0104VDR design with TI: https://www.ti.com/product/TXB0104#support-training 

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

I am considering removing the pull-ups and the capacitors have already been unmounted.

I2C signals from STM32 aren't being captured when pins PG13 and PG14 are being probed. INTERRUPT is generated upon key press and a 3.3 V to 0 V to 3.3 V transition in seen on the keypad end. On pin PG9, 1.8 V to 0 V to 1.8 V transition is seen. However, the MCU doesn't detect any change on the pin, which seems to indicate the pin and MCU might be unresponsive to each other.

Yes, TI selection guide indicates that the product I selected is intended for I2C use. However, the link redirects to a different product TXB0104, which isn't applicable in I2C applications.

"OE is referenced to VCCA." What this indicates is that HIGH for OE is 0.65 x VCCA = 1.17 V in this case. In this design, OE is set at 1.65 V, which means OE is clearly HIGH. It is not an issue to be connected to either VCCA or VCCB as long as the voltage requirement of this pin is met.