I2C between ST nucleo and AGX

Hi,

I’m trying to write a simple program that communicates via i2c pins 3 & 5 of the 40 pin expansion header with a ST development board nucleo-g071rb.
So the pin mapping is as follows with direct wiring (no resistors, AGX to ST):
3 → PB9 (SDA)
5 → PB8 (SCL)
9 → GND

The ST pins were configured for I2C1, low speed and with pull-up (to use internal resistors), all other parameters were left intact (including slave address, no dma etc.).
The micro program was developed in various ways (blocking slave / master with event interrupt disabled, interrupt mode with NVIC interrupt enabled).
However, using i2cdetect over bus 8 doesn’t yield any register indication and from the micro side it reports an error of HAL_I2C_ERROR_AF when trying to receive data (to work with read byte command of i2cdetect).
Tried other i2c buses, but no answer as well.

Am I missing something on the ST side for proper configuration of the board?

Thanks in advance,
Moti.

hello moti4,

you may see-also Jetson AGX Xavier Series OEM Product Design Guide for [Figure 13-1. I2C Connections].
they’re pin# A53/C53, and there’s voltage level shifter (1.8V or 3.3V). it’s by default 1kΩ pull-ups to 1.8V on module, please double check the device is using 1.8V also.

Hi Jerry,

Thank you for the pointer, it was helpful.
So apparently it is due to an electrical mismatch.
The specific board is NUCLEO-G071RB | Mbed (possibly to use NUCLEO-L476RG | Mbed).
It seems like it expects 3.3V on the I2C interface (from their header connection and datasheet).

Taking a look here, the guide describes how to connect two ST boards with pull-up resistors of 4.7 kOhm.

What would be the recommended approach?

  • Hardware-wise to add the right resistance or level-shifter?
  • Configure jetson registers as in note 2 Table 13-4? If yes, how can that be accomplished?

Thanks,
Moti.

Hi, please check the jumper connector J514 on carrier board. It is for voltage level of I2C you used. Shorting pin 1 and pin 2 of J514 will set the I2C level to 3.3v.

Perfect, I’ll check that.
Can you guide me where in the documentation I can find more details about it? (For any future need).

Hi, following @Trumany suggestion that helped a lot, another modification was needed on the STM32 side.
Seems like working in blocking mode requires delicate handling, while interrupt mode was successful.
In addition, the project is configured without pull-up resistors.

For anyone interested, check out the following link: https://community.st.com/s/article/how-to-create-an-i2c-slave-device-using-the-stm32cube-library, and my original post here.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.