2021-05-08 06:12 PM
My schematic is exactly as shown on page 26 of https://www.st.com/resource/en/datasheet/stusb4500.pdf with an ESP32 connected to the I2C pins and a BQ2057WSN downstream on Vsnk. However, on connection to USB-C the chip negotiates an explicit 5V power contract (verified with a PD sniffer) instead of the 9V specified in PDO2/PDO3. If I run a trivial sketch on the microcontroller that does nothing at all other than connecting to the chip over I2C and issuing a soft reset then the STUSB4500 again starts out at 5V, but then correctly renegotiates to 9V.
I need the STUSB4500 to function autonomously so that my device can charge without power to the microcontroller. What am I missing?
If it helps, when I run the ReadParameters example from the SparkFun libraries at https://github.com/sparkfun/SparkFun_STUSB4500_Arduino_Library the output I get is:
Connected to STUSB4500!
PDO Number: 2
Voltage1 (V): 5.00
Current1 (A): 1.00
Lower Voltage Tolerance1 (%): 0
Upper Voltage Tolerance1 (%): 20
Voltage2 (V): 9.00
Current2 (A): 1.50
Lower Voltage Tolerance2 (%): 10
Upper Voltage Tolerance2 (%): 10
Voltage3 (V): 9.00
Current3 (A): 1.50
Lower Voltage Tolerance3 (%): 10
Upper Voltage Tolerance3 (%): 10
Flex Current: 5.32
External Power: 0
USB Communication Capable: 0
Configuration OK GPIO: 0
GPIO Control: 1
Enable Power Only Above 5V: 1
Request Source Current: 0
2021-05-11 11:08 PM
Please modify NVM accordingly. Simply speaking,
2021-05-12 12:05 PM
Thankyou, but I'm not sure this helps me:
2021-05-13 08:02 PM
Yes, in case it can negotiate to 9V after issuing a soft reset, the NVM should have been configured correctly.
The question would be what's the differences between the first attaching and the second one after resetting.
Did the STUSB4500 work as a standalone controller or
was the MCU involved in the PD protocol - controlling STUSB4500 during negotiation?
What is the clock for the I2C?