2025-02-10 12:41 PM
I'm developing a low-power device using the STM32WLE5.
To reduce power consumption of the peripherals (sensors / display / eeprom) during the sleep of the MCU, all these peripherals are switched off with a P-channel mosfet as shown in this part of the schematic
The enable is driven down by a GPIO when the peripheral is active.
To minimize the power consumption of the MCU during sleep, the IO's are configured as Analog inputs. The 1M pull-up resistor keeps the mosfet OFF when it's gate is not driven during sleep of the MCU.
But it's not working as expected : when the IO is configured as analog, it's not rising to 3.3V, but remains at 2.5V, too low to properly turn off the mosfet..
When I replace the 1M with 330K, it's better, but I'd like to understand why such a strong pull-up is needed ?
The GPIO in analog input mode should be very high impedance, same for the mosfet..
I could keep the GPIO in output and drive the mosfet gate even when MCU is in sleep, but AN4899 recommends them to be configured as Analog inputs to minimize power consumption.
Curious as what you guys think is the best solution here.