2025-06-26 7:46 AM - last edited on 2025-06-27 1:06 AM by Andrew Neil
Hi Team,
We are currently working on a design using the STM32U5A5QJI6Q microcontroller in a BGA package, implemented on a 4-layer PCB. During the hardware development phase, we inadvertently omitted the external pull-up resistors on the I2C lines, specifically on PB6 (A5) and PB9 (A4), which are configured for I2C_SCL and I2C_SDA respectively.
Our software team has informed us that there is no option to enable internal pull-up resistors for these specific pins through software configuration. Given the constraints of the BGA package and the complexity of reworking inner-layer routing, we are seeking your expert guidance on the following:
We would be grateful for your support in helping us resolve this issue efficiently.
Thank you for your time and assistance.
Best regards,
Sathiya
2025-06-26 7:55 AM - edited 2025-06-26 7:57 AM
You can use the internal ~40 kOhm pullup resistors with reduced I2C clock rate, maybe 10 kHz, and it'll work just fine.
I'd put a scope on SDA/SCL to verify edges are sufficiently fast for the clock rate you choose.
It's not ideal because your bus will be floating before the pins are initialized, but this will likely not be a problem. If it is and slaves are holding SDA low, SCL can be toggled to free up slaves.
2025-06-26 7:58 AM
Internal pullups are not suitable as I2C pullups - much too high resistance.
Does the I2C slave device(s) have accessible pins?
Are there testpoints on the I2C lines? Vias?
Nothing specific to STM32 here - this is just general prototype/rework stuff.
Image credit: https://www.circuitrework.com/services/circuit-board-modification.html
2025-06-27 12:08 AM
Hi,
Thanks for the detailed explanation! You mentioned detail for STM32U5A5QJI6Q (BGA package). we used STM32U5A5QJI6Q (BGA package) and using PB6 (A5) and PB9 (A4) as I2C lines for interfacing with a battery charger IC and fuel gauge chip. Since the I2C lines are routed internally without vias, you're unable to add external pull-up resistors, and we wondering:
Is Possible to configure the PB6 (A5) and PB9 (A4) pin to Software I2C, if is possible how to change ?
Regards,
Sathiya
2025-06-27 12:12 AM
Thank you for your response. Unfortunately, we cannot rework the board because it is very small, and there are no vias or external pads available to add a pull-up resistor.
If possible, we would like to use the same pin for software I²C with the internal pull-up resistor enabled. Could you please confirm if this is feasible?
2025-06-27 12:49 AM - edited 2025-06-27 12:52 AM
As TDK has pointed out, You can enable the internal week pullup (worst case is 50K Ohm) this is about 10 times the resistor value normaly used on I2C. So this is only a work around for the prototype (You have to modify the schematics / PCB for a stable product), and requires that You reduce the I2C clock!
2025-06-27 1:03 AM - edited 2025-06-27 1:04 AM
@Sakthi_IND wrote:If possible, we would like to use the same pin for software I²C with the internal pull-up resistor enabled. Could you please confirm if this is feasible?
Whether you use software or hardware I2C is irrelevant - a resistor is a resistor!
As @TDK and @MHoll.2 explained, the internal pullup is "weak" - so you will have to severely limit the I2C speed.
It'll also be more prone to noise.
So, yes, it can "work" - but it is far from ideal.
You really need to re-spin the board to correct this fundamental error.
See this article for the effects of too-high pullup resistance:
https://electronics.stackexchange.com/a/473799
2025-06-27 1:07 AM
Hi, thank you for your response.
Is it possible to configure a pin PB6 (A5) and PB9 (A4) as a GPIO with an internal pull-up resistor through code and
can PB6 (A5) and PB9 (A4) be used for software I2C implementation?
The I2C is only used to set the charging current limit of the charger IC and to monitor the battery voltage. So, high-speed communication is not required.
Regards,
Sathiya