STM32L1 GPIO Messing with low power
Greetings,
I have an ST32L151CCT6 part with pin PB5 connected to the DE pin on an THVD1400DR RS485 Transciever, my whole system is designed to be low power, and the MCU enters stop mode to achieve that from its side, every pin goes to analog mode. I have meassured the power consumption of my whole system when I take out the transciever and it reaches the expected 40uA.
The problem:
Current rises up to 11mA when I solder the transciever back, even so, I mannaged to find the exact connection with the problem, when I raise the DE Pin on the part breaking the direct connection to PB5 the higher current consumption problem dissapears.
What kind of worked:
Setting the PB5 pin to INPUT makes the current consumption go up to 150uA, wich is way higher than we aimed for.
What I have tried so far:
I tried placing a 470K resistor in series to the trasnciever and the voltage at the DE Pin went to 0.7 volts, wich shouldn't as the datasheet for the transciever states having an 2M pull down resistor. If I go lower then the problem arrises again.
Placing a 470K resistor from PB5 to GND lowers the consumption.
Placing a 68K resistor from PB5 to the DE pin achieves the level required for making it work, but the consumption problem persists.
I measured flowing to the MCU in case there was a leak, but it read 0uA, wich makes me believe there is something inside the MCU triggering and rising its power consumption.
Swaped MCUs, transcievers, same results.
I am using HAL libraries
Any guidance on some info I am missing will be very much appreciated.
VL.
