Hi, I came across the below reply from this thread and I need to confirm if this is true because I am seeing unexpected behavior with the MP5031 when I2C_MODE pin is tied to 5V VCC.
I am currently using the MP5031 with a non-MPS buck-boost, with an STM32 acting as I2C master, so the MP5031 is acting as slave.
At the hardware level, GPIO5 pin is tied to my STM32 because I intend to configure it as ATTACH interrupt so my STM32 can poll the relevant status registers for negotiated PDOs.
However, I am finding that the MP5031 is constantly sending NACKs when I try to read or write over the primary I2C pins (pins 1, 2 for SDA/SCL).
I can read back the device at address 0x28 when I run a sweep on the I2C bus, so I know it is active, but it will always NACK when I try any reads or writes.
Is the above reply correct? Setting I2C_MODE to HIGH turns the MP5031 into a “dead” slave that does not respond to reads and writes as I am observing?
Or is there any conflict with wiring GPIO5 to my STM32 (i.e. I need to use GPIO7 instead, assuming the internal I2C controller uses GPIO5 during initialization or something).
After more debugging, I discovered that my issue is due to some hysteretic behavior with the MP5031. I cannot identify the root cause yet, but a power-cycle seems to bring the MP5031 back to the bus. When I can scan it as present on the bus, I can read and write from/to it. However, it will eventually disappear from the bus and I will have to power-cycle again.
On my end, I will look into why this is happening, maybe it’s just my circuit or firmware design.
However, to close the loop, the comment in that original post is incorrect. When in I2C slave mode, you can read and write, in case this helps someone with the same issue in the future.
Hello, I am interested in exactly the same scenario: I already have an STM32 MCU that is an I2C master and I would like to communicate with an MP5031 as a slave and receive from it eg what is the desired VBUS voltage and current limit so that the MCU can set that value on the existing DC-DC converter. I’m not sure if I understand your last post: whether the MP5031 as a slave can offer such information (by reading its registers) or not. Another question is which MP5031 GPIO can act as an interrupt output: GPIO1 (default in master mode), GPIO5 or GPIO7? Your input is greatly appreciated. Thanks in advance.