I'm trying to set-up a STM32F091 with a battery connected straight into the VBAT pin. For the first couple times I turned on this vbat at 3V, it worked ok (no weird behavior). However, after trying to program the MCU via SWD, this VBat pin became a low impedance path to ground (around 150 Ohms) sinking 20mA. At first I thought this low impedance path was in my board, but then I removed the MCU and measured the resistance on the chip between pins VBAT and Ground, getting 159 ohms as a result. This problem manifested itself in two different chips and similar resistances were measured (150 and 250 ohms).
I'm inclined to believe this is a problem, since the VBat domain is supposed to power the RTC and back-up register, definitely not sinking 20mA @ 3V. I have not found any information on the device errata sheet and the data sheet says this pin draws uA's when powering the RTC domain.
The circuit is a straight connection between the battery and this pin. All others power pins are connected according to the datasheet. An interesting fact is that the ADC channel 18 (ADC_IN18) measures the voltage on VBat pin correctly.
Have anyone experienced this before? Am I missing something when using Vbat or is this a configuration issue?
Update: Problem found. See photos of PSU voltage wild excursions when turning off:
and turning on: