# STM32 Protection Diodes and Voltage over VDD

I have a 3 color LED that I'm controlling from an STM32. VDD for my mcu is controlled by a switching regulator set to 3.0v . Unfortunately the forward drop on the the green led is 3.2 volts. This forces me to source current from the battery attached to my board ( 3.8v lipo). So the anode of each led is connected to the battery, and each cathode is connected to a resistor and then an io pin of my SMT32.

If you cruse the SMT32F* reference manuals you'll find out that each IO pin has a set of protection diodes attached (see below). The problem is when I shutdown the Switching regulator it effectively ties vdd to ground. So we have a path from the battery through each of the leds through a resistor finally though the protection diode to vdd which is tied to ground. I need to turn off the switching regulator to conserve battery power.

My question is does anybody know the forward drop on these protection diodes? If its high enough then i don't have to worry about current flowing through the leds and protection diodes to ground. If it isn't I'm assuming I'll have to put a between the mcu and the regulator unless somebody else has a clever soltuion to this problem.

• Why not use a transistor driver? Mar 26, 2014 at 4:32
• When different supply voltages were used, we will get these scenarios. Absolute maximum ratings give typ forward voltage of diodes on IO's. like -0.3 to VCC+0.5V, SO, lower diode can handle 0.3V and Higher diode handles 0.5V. Based on max battery voltage, LED forward voltage drop we can calculate the current through these diodes Vbat =3.8, Vf of LED =3.2, Vf of Top diode assume 0.5V ---> 3.8-3.2-0.5/Current limiting resistor. Current may be very less...But this is not recommeded. Mar 26, 2014 at 8:20
• Keeping in mind your battery voltage will be up to 4.2v when freshly charged, the external transistor/fet driver sounds like a good idea. Also, there may be an unfortunate variation in brightness between a fully charged and an end-of-intended-discharge battery. Mar 26, 2014 at 14:38