cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 Powered through SPI

Popcorn
Associate II
Posted on July 27, 2012 at 16:10

Hello,

I have two STM32 chips, one as Master and one as Slave on separate power domains of 3.3V each. My problem is that when the Slave is turned off and power is removed, it is still being powered from the SPI Master. The voltage on the power pins of the SPI Slave when the power is removed from it is 2.65V. If I remove NSS (Chip Select) from the Slave the voltage drops to 1.1V on the slave power pins and the device finally shuts off.

The layout is as follows:

Master: STM32F103VET6

Slave: STM32F100C6T6B

The Master always receives 3.3V on its own Voltage Regulator. The Slave has a switched 3.3V Source on its own Voltage Regulator. The only connections between the two are the SPI Pins MISO, MOSI, SCK and CS.

Does anyone know of a solution? Is it normal for the SPI Slave to be powered entirely through SPI?

Thanks in Advance,

Patrick

6 REPLIES 6
Posted on July 27, 2012 at 17:48

Presumably because you're back feeding through the ESD protection diodes on the input cell and into the IO ring supply?

Aren't there specification that say you shouldn't have a voltage on the inputs that exceeds VDD. ie Don't inject current into a device, especially when it's OFF

Tri-State your pins when it's attached to a chip that is OFF.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
frankmeyer9
Associate II
Posted on July 27, 2012 at 18:28

While it doesn't help much, this issue is neither bound to SPI nor to STM32 controllers. I have seen Microchip PIC18 controllers which run nicely when powered through a GPIO pin.

While this PICs run on as few as 2..5mA, I would worry if this STM32 GPIO pin and it's protective diodes can stand the drawn current on the long run. Perhaps you can gate the lines with additional FETs.

Popcorn
Associate II
Posted on July 27, 2012 at 19:48

There are no external ESD Diodes so I'm not sure. I'm not sure if there is internal ESD protection but probably.

I was looking for specification on whether I can have any voltage on the input pins that exceed VDD, but I couldn't find anything in the Datasheet or Usermanual, unless I'm looking in the wrong place. But it certainly makes sense. It's what I thought was the case

I guess I'll probably need to connect an external buffer to the SPI input lines. I have another device sharing the SPI with the slave device, but powered by the same Voltage Regulator as the Master.

Any suggestions on what I should use to tri-state the pins?

Popcorn
Associate II
Posted on July 27, 2012 at 19:50

Thanks. But it's important in this case that it is not powered by the SPI at all. It must be either on by its own Voltage Regulator, or off entirely.

How would you suggest gating the lines?

frankmeyer9
Associate II
Posted on July 28, 2012 at 12:20

There are no external ESD Diodes so I'm not sure. I'm not sure if there is internal ESD protection but probably.

 

They are definitely there - internally.

They do not provide on operational function, so they are often omitted in schematics in the datasheet or ref. manual.

frankmeyer9
Associate II
Posted on July 28, 2012 at 12:30

How would you suggest gating the lines?

 

I meant using a FET similar as an analogue switch.

The 4066 of the CMOS series is an example.

But I don't fully understand how the STM32 is powered through a GPIO pin. The PIC18F I mentioned is a little different. His ports are 'always on'. The STM32 ports have a gated clock. After reset, they are supposed to be off - I can't fully understand how it gets powered under this circumstances. The only possibility I see is that you turn off that STM32, and the current though the GPIO just keeps it running.

In this case, a reset pulse from the other uC might help.