cancel
Showing results for 
Search instead for 
Did you mean: 

How To Protect STM32 GPIO From Current Injection When VDD=0v

MSauv
Associate II

I am working on a device, based on SAMD21 (DEV1), that interfaces with a different device which is based on the STM32F405RGT6 MCU (DEV2). These two devices share a power source and communicate using UART. Though these devices share a power source, there is a chance that DEV1 can be powered on while DEV2 is not. Because of this, DEV1 can inject current into the unpowered DEV2.

I would like to understand what I can do on DEV1's side to make sure that even in the case described above, the injected current does not damage DEV2. Currently, neither of the devices have any components connected to the rx and tx UART signals.

I see from the STM32's datasheet, that the AMV for input voltage on a five volt tolerant pin is VDD+4v and for all others is 4v. This makes me believe that as long as the voltage is kept below 4v, then the STM32 can survive the 3v3 being applied to its input.

What I plan to do at the moment to protect the STM32 (and potentially the SAMD21) is to add 1k resistors in series with the rx and tx lines. I believe that the STM32 clamps over-voltage on all inputs and this would limit the current to < 3.3mA. Will my solution work to protect the STM32? Or is there something I am missing that would reder this solution ineffective?

6 REPLIES 6
Uwe Bonnes
Principal II

Choose the Dev2 (Stm32) pins carefully so that all connection pins are 5-Volt tolerant. Specification for those pins is:

Input voltage on five-volt tolerant pin(2) VSS­-0.3 to VDD+4. If Dev1 has 3.3v signalling, all is fine.

Unfortunately, I only have control over Dev1 and I have no way of knowing for certain that Dev2 maps the UART rx and tx pins to 5v tolerant pins. Since when VDD=0v the maximum rating of all pins is 4v (see below), wouldnt a pin that is not 5v tolerant still be ok to use?

0690X00000AQouGQAT.png

If so I would just need to regulate the injected current, right? That is my thinking when proposing that I add 1k series resistors.

MSauv
Associate II

Does anyone else have any thoughts or advise for this?

Ozone
Lead

I would check the datasheets. GPIOs use to have a limited current drive capabilities, usually a few milliamps.

If the sourcing device takes no damage, the sinking (usually) neither.

Somehow related - AFAIK the TI Cortex M4 devices used to have a selectable current driving capacity of 2, 4 and 8mA.

Piranha
Chief II

In a datasheet read also the small note (2):

2. VIN maximum value must always be respected. Refer to Table 12 for the values of the maximum allowed

injected current.

And also the section "5.3.15 I/O current injection characteristics" and "Table 47. I/O current injection susceptibility".

My conclusion is that +3,3 mA seems to be OK for edge cases, but not for normal prolonged operation.

MSauv
Associate II

@Ozone​ , @Piranha​ , Thank you for your help. Below the important bits of some charts @Piranha​ referenced. Based on these I have also come to the conclusion that adding 1k resistors in series with the UART rx/tx lines will protect the STM32 since the 3.3mA current injected will be withing the limits.

0690X00000AQytIQAT.png

0690X00000AQytSQAT.png

0690X00000AQythQAD.png