Arm Mbed OS support forum

Why are the I2C scl and sda gpio pins configured as pull-up in the example to read data from on board sensors for the target B-L475E-IOT01A1

For the target B-L475E-IOT01A1, in the mbed example for reading onboard sensor data, the i2c2 pins are configured as pull up.

In the schematics, it shows that the pins already have pull-up resistors attached. Why do we need to enable the internal pull-up resistors for the gpio pins to read the data?

The mbed drivers for i2c by default set the gpio pins of i2c as open drain no pull. But when the same is used in case of this board, I cannot read the sensor data.

Enabling the internal pull up on GPIO pins gives the data correctly.

Please clarify the need of enabling the internal pull ups when the external pull up resistors are already connected as per the schematics.

Thanks in advance!