3
\$\begingroup\$

I am currently going through an interesting situation where I have two MCUs (Let's call them A and B) in my design. One of the MCUs (A) is always powered on and another MCU(B) is powered through a regulator whose enable pin is controlled by the first MCU. There are many GPIOs connected between these two MCUs. And some peripherals and ADC feedbacks are connected to MCU B.

Now the situation is that I have to put MCU B in power down mode in my application for some time and during that time MCU A will be functioning normally. I checked that if I don't give any power to MCU B then it gets powered up due to GPIOs connected to it. And I am afraid that MCU B can damage the code of MCU A or self-code or other peripherals because it's powered on when it is supposed to be off. The following block diagram explains the situation better: block diagram showing MCUs, regulator and peripherals

One possible solution that comes to mind: putting a buffer for all connections of MCU B and powering that buffer IC through MCU B's power pin so it will be disabled and can disconnect the pins when MCU B is off.

\$\endgroup\$
  • 2
    \$\begingroup\$ Why don't you simply put all communication lines from A to B in Z state when B is off? \$\endgroup\$ – Dmitry Grigoryev Apr 21 '17 at 11:00
  • 1
    \$\begingroup\$ Does it have to be powered down, or can you just put it in deep sleep / hold it in reset? \$\endgroup\$ – pjc50 Apr 21 '17 at 11:00
  • 2
    \$\begingroup\$ You must not un-power an MCU while any of its I/0 lines are active-hi. MCU-B runs the risk of latch-up, if I understand the connections. Putting MCU-B to sleep, or reset is absolutely required, rather than kill its main supply. \$\endgroup\$ – glen_geek Apr 21 '17 at 11:20
  • \$\begingroup\$ related question: electronics.stackexchange.com/questions/197702/… \$\endgroup\$ – Arsenal Apr 21 '17 at 14:26
9
\$\begingroup\$

Leave the MCU powered and put it into a sleep mode. Much better practice. Also, you wouldn't need that regulator anymore.

Note that on many datasheets, "Absolute Maximum Values" are defined as relative to Vcc. This isn't real meaningful when Vcc is floating (and meaningful in a bad way if Vcc is zero) -- so powering DIO pins when the microcontroller is off is just not great practice.

\$\endgroup\$
  • \$\begingroup\$ Thanks Scott for clarification. I think I will mostly avoid power down of MCU. \$\endgroup\$ – Rudraksh007 Apr 21 '17 at 13:01
4
\$\begingroup\$

Scott's solution (+1) is the preferable one, but if you must avoid that for some reason you can use a dual supply voltage translator chip with both voltages the same. Use one that is guaranteed to go high-Z when the power is removed. For example, the 74AVC4T245 (suitable for 3.3V systems, there are others that will work for 5.0V).

An ordinary buffer will likely have the same issue as the MCU, but will move the problem to the buffer chip.

You can also use homemade buffers using BJTs or MOSFETs as RTL inverters that will prevent the problem.

In some cases a simple series resistor can be used, but that's a bit more iffy and it still may undesirably power up your circuit.

\$\endgroup\$
  • \$\begingroup\$ Thanks for the input. I think I will avoid Power down of the MCU. \$\endgroup\$ – Rudraksh007 Apr 21 '17 at 13:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.