I have two micro-controllers on a PCB. Both operating on 3.3V. One microcontroller will always be running. I need to cut off the power supply to other micro-controller sometimes. (This is not for power saving. I need to power cycle the micro-controller) For this, I am making a high side switch using p-mosfet. Here is one question I posted earlier. As pointed by some talented members, I can use a mosfet. Here is the circuit that I could come up with:
Load is a microcontroller and some other circuit such as optocouplers. I want the switch to be normally closed. Hence I have used R2. I am planning to use R2 = 10 kohms. Will it be fine? If not, what will be a more suitable value?
Current requirement approx 200 mA. Consider a worse case scenario of 500mA.
Working: Whenever I want to cut off the power supply to the other micro, I will just set the 3.3V_LOGIC pin to HIGH. Once I want to resume the power, I will set the 3.3V_LOGIC pin as an INPUT pin, making it a high impedance pin and allowing R2 to take over, turning ON the power to the other micro. Will this work as intended?
Another doubt point: Both micro-controllers are communicating over i2c. Is there a possibility that other micro draws power from i2c lines and remains alive while I turn off the mosfet? Will declaring the i2c pins as output and setting them LOW ensure that other micro-controller switches off?
I am using DMP2100U-7 p-mosfet.