2019-09-03 02:31 PM
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?
2019-09-03 02:38 PM
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.
2019-09-05 07:34 AM
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?
If so I would just need to regulate the injected current, right? That is my thinking when proposing that I add 1k series resistors.
2019-09-10 06:49 AM
Does anyone else have any thoughts or advise for this?
2019-09-10 07:15 AM
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.
2019-09-10 08:43 AM
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.
2019-09-10 10:44 AM
@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.