cancel
Showing results for 
Search instead for 
Did you mean: 

NRST Pin STM32 Protection.

Marcel Blindu
Associate II

If we don´t use the NRST pin how o what to need to put to this pin to protect from ESD.

The other question is the pins that don´t use from the micro what I need to do with them (put pull-up or pull-down o kepp open externally) ? referring to ESD.

9 REPLIES 9
Marcel Blindu
Associate II

when I refer to ESD is EMC

Marcel Blindu
Associate II

For the pin WKUP we need to put something to protect this pin?

Danish1
Lead II

I think there's a misunderstanding here.

Stm32 pins have a degree of ESD protection, with diodes that clamp the input voltage on each pin so it can go no lower than 1 diode drop below Vss, and no higher than about 4 V above Vdd. These diodes are reasonably robust (as is the wiring around them) but a sufficiently large electrostatic event can kill them.

There are two potential problems.

  • That of a pin being hit by an electrostatic event, where e.g. someone gets charged up to a high voltage by walking on a nylon carpet / stroking a cat / using a Van-de-Graaf generator or whatever, and then they somehow transfer that voltage to a sensitive pin
  • That of a digital input pin gently floating to a voltage somewhere between Vss and Vdd. This turns on both transistors in the input circuit, and consequently the microcontroller's power consumption increases.

If a pin is hidden inside a screened box that is connected to Vss, there's little chance of an electrostatic event, unless you happen to be switching high voltages (including turning off relays if you forgot the diode).

But if the pin goes directly to a capacitive touch region near the outside of your box, then it could well see an electrostatic event, so you might consider having your own external ESD-protection clamps, and a filter to ensure the ESD event goes to your clamps rather than the ones built-in to the stm32.

As for digital input pins floating, you could pull them either high or low, either using external components or built-in pull-up/pull-down resistors. Or you could program them to be analog inputs (turning off the digital input altogether).

Something like NRST, where the system won't operate if the pin goes low, naturally has to be pulled high. The data sheet on your micro probably has a recommendation here; looking at the one for stm32f415 I see the pin has a built-in pull-up resistor somewhere between 30k and 50k and they recommend 0.1 uF to Vss as well as the suggestion of a reset switch.

I think tying the lines directly to a power-rail is discouraged because high current will flow if ever the pin is accidentally programmed to be a digital output at the other level. Also you can't then solder a wire to that pin for extra I/O - either debugging or new functionality.

Hope this helps,

Danish

Mohamed Aymen HZAMI
ST Employee

Hello Marcel,

  • All the IO's are by default protected by ESD.
  • For more details about the NRST pin you can refer to datasheet section"5.3.17"
  • You can enhance the protection by adding a diode ESD to the IO's.

You can refer also to the datasheet product section 5.3.14 " 5.3.14 Absolute maximum ratings (electrical sensitivity) ".

Note : the datasheet that i search in it belongs to the STM32F407VG device.

Best Regards,

Mohamed Aymen.

But in standby mode we can`t control the state of pins so if we use this mode we need to put pull-down o pull-up resistor for all pins that we don`t use?

We need to put ESD diodes for all pins or for critical signals how NRST. WKUP?

Some more?

That must depend which stm32 you use. I've just checked the reference manual for stm32l4x6 and table 23 says, for GPIOs in standby mode, see note 9:

9 I/Os can be configured with internal pull-up, pull-down or floating in Standby mode.

the microcontroller is STM32F103RG

If you're thinking about EMC issues (rather than ESD) - such as unexpected resets, wakeups or crashes, then ESD diodes are unlikely to help. The stm32 already has diodes going to Vss and something similar for Vdd. Diodes will stop the voltage going outside the allowable range but they won't stop the voltage being the wrong logic level.

For EMC, where you have a high-impedance track going to a sensitive pin such as NRST, it is possible that this track is acting as an antenna and picking up electrical spikes that might cause a reset. And you probably have already rejected the possibility of lowering the impedance by using a smaller-value resistor pulling the line to Vdd because of the higher current consumed while resetting the stm32. A possible fix here is to lower the AC impedance of this track by adding 0.1 uF between it and Vss close to the stm32 pin; ST do suggest this in some data sheets I've seen.

Of course unexpected resets or crashes could be due to errors in your code. Please don't take this as an insult - these devices and the tasks we ask them to do are both very complicated and unless one has a full understanding of everything involved (I don't), it is easy to leave in a few bugs.

Hope this helps,

Danish