Hello. I want to implement a multi function power button on a device using BQ25895. The button can power on the device when it's powered off (BQ25895 in shipping mode), and it will function as a normal button when the system is already powered on. When it's pressed for longer (10 secs IIRC), it will power cycle the device. Just like today's smartphone.
So I wanted to connect the three things together: (1) The QON pin (2) Button (3) A MCU pin. The MCU is powered by a 3.3V LDO connected to BQ25895's VSYS pin. When the device is powered on, since the connection is already pulled up by QON pin, I only need to set the MCU pin to input mode and observe logic changes. But when I turn power off (let BQ25895 go into shipping mode via I2C), since the MCU's I/O pins can't maintain HiZ when it lost power, it will drain current and effectively pull QON to GND and let the device power on again.
I want to know if there are solutions to this. I think using a PMOS with (1) Gate connected to QON pin & Button (2) Source connected to 3.3V (3) Drain connected to MCU pin, and add a pull down resistor on MCU pin, can solve this problem. Do you think this will work?
Thanks.