Will an OFF state AVR power up during SPI transaction

Go To Last Post
7 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have an AtMega328p which will be in OFF state (VCC = 0 V) and another uC which will be connected to it through SPI. The second uC can initiate an SPI transaction - call chip select, send SCK etc, but the AVR is still in its OFF state. So my question is

1.Will this cause the AVR to get powered for a brief duration (when the pin is high)? I know it won't get enough current (the second uC GPIO pin won't supply enough), but will this flickering power cycle cause problems?

2.What should I do to prevent this if it happens?

Clament John | Still in school 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If you have an active high output connected to an unpowered device, it would seem logical that the powered device would try to power the unpowered one via the connected pin. That pin has a normally reverse connected protection diode which would become forward biased lifting the unpowered device's supply line up to one diode's forward drop less than the powered device. The next operation would be indeterminate I suspect except that your powered device would now be trying to supply whatever current loads are present on the "load". How to limit these effects? Put a series resistor in.... or better still... don't allow this to happen.

 

Ross McKenzie ValuSoft Melbourne Australia

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If you have two (or more) MPU's connected via port pins, you must make sure all devices have power, before bringing any of these pins high, or the other MPU will attempt to power up from the interconnected pin.  (Ask me how I know this)  This is not good!  Suggestion, change the design so one MPU is master and can control the power state of the others, or redesign to use only one MPU!  You will be glad you did.

 

Jim

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Clement.J wrote:
I know it won't get enough current (the second uC GPIO pin won't supply enough),

Your second uC GPIO can't source a couple mA?

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

theusch wrote:

Your second uC GPIO can't source a couple mA?

In the 328p datasheet, I remember a GPIO will pull/push 25mA and to power-up it needs 250ms. So I assumed it won't provide enough to power the uC.

Clament John | Still in school 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

valusoft wrote:

If you have an active high output connected to an unpowered device, it would seem logical that the powered device would try to power the unpowered one via the connected pin. That pin has a normally reverse connected protection diode which would become forward biased lifting the unpowered device's supply line up to one diode's forward drop less than the powered device. The next operation would be indeterminate I suspect except that your powered device would now be trying to supply whatever current loads are present on the "load". How to limit these effects? Put a series resistor in.... or better still... don't allow this to happen.

Will setting the uC into sleep make any difference?

ki0bk wrote:

If you have two (or more) MPU's connected via port pins, you must make sure all devices have power, before bringing any of these pins high, or the other MPU will attempt to power up from the interconnected pin.  (Ask me how I know this)  This is not good!  Suggestion, change the design so one MPU is master and can control the power state of the others, or redesign to use only one MPU!  You will be glad you did.

How do you know this?

Yes, I'll change the design. Thank You.

Clament John | Still in school 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Clement.J wrote:
In the 328p datasheet, I remember a GPIO will pull/push 25mA and to power-up it needs 250ms.

??? Did you mean 250mA?  If not, what does startup time have to do with e.g. /SS idling high and/or SCK idling high?

 

Active AVR current is generally a few mA at modest clock rates.  Of course things will depend on the particular circuit but AVRs will indeed [at least try to] run off parasitic power.

 

(Isn't there a kind of famous little AVR app that only does parasitic power?  I forget -- is it an RFID device?)

 

 

 

 

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.