Don't drive LEDs from these pins. "PC13, PC14 and PC15 are supplied through the power switch". What does this power switch really do?
Summary
At the end of the day, my issue is missing something in documentation.
The lesson here, is test thoroughly. Just because it works for a few minutes, doesn't mean forever.
Anyway, I've been running >3mA through the pins that are limited before of this "power switch" thing. I was wondering if anyone knows more about and how/why these pins are connected like this?
Details
I'm running two different boards with the same chip (STM32L431) and firmware.
I have some debug LEDS on my board that flash 1sec on, 1sec off in open-drain configuration.
In one case its an RGB led where I flash blue and green (10mA each)
In the other case its a while LED that shares the same 2 pins (20mA total)
Over time, it seems that this eventually burns out the MCU (first getting hot, then breaking all together).
According to DS11453 Table 20. Current characteristics, you can easily run LEDS like this.
However!. I chose were PC13, PC14 and PC15.
While is says Nothing at all about this in Electrical Characteristics. It does say at the very end of table 15 "pin definitions"... "except exactly these pins" and says they specifically are limited to 3mA.
Personally I think this is a little easy to miss... but, my bad. Hardware is hard.
The only catch here is that.
Burnout of the chip, only occurred in the RGB case (10mA per pin) . And it took hours for it to actually get hot (again, the 2 colors were used, so only PC14 and 15)
In the white LED case: this actually ran just fine for weeks without getting hot.
(It's a prototype, I did not test longer).
According to AN4899 chapter 5.3.1 "White LED drive" One can distribute greater loads over multiple GPIO connections as long as one does not exceed the current capacity of the chip or the port.
As you can see , my design is not correct because you are supposed to use 2 resistors and distribute the current evenly across the pins.
Theory
So my theory is that - despite documentation - PC14 and PC15 might not experience this 3mA limit in the same way. It could be that the limit is higher for one of them.
Also, since I can't find this "3mA" anywhere in the Electrical characteristics, I speculate its not an accurate estimate and might even differ between batches/environment, etc.
It also might be a tolerance that takes some time to develop as the switch's material breaks down.
In the case of these boards Vbat is connected to VDD. (I'm not sure if this makes any difference)
Regardless, I've already changed the design to use other pins. I'm still very interested to hear peoples thoughts. Specifically I've never heard of this "power switch" before. Does anyone have more info on how this functions and can affect future designs?
