cancel
Showing results for 
Search instead for 
Did you mean: 

GPIO CONFIGURATION

rib.1
Associate II

basically I'm working with a LoRaWan card that mounts your STM32WLE5CCU6 microcontroller.

the problem arises from the high consumption of my product.

I'm trying to program the PA8 pin of the microcontroller as an input that is always under VDD and I've soldered a 470K resistor upstream of the pin to reduce the circuit consumption as much as possible.

but with this resistance the pin no longer relays the current.

in practice this pin is connected to a switch (TX_ON_EVENT) can you help me or tell me someone who can help me solve the problem

switch NC and when it's Open TX_ON_EVENT

4 REPLIES 4
AScha.3
Chief II

with the best will in the world i cannot understand what it is all about.

what you have?

what you want change?

what is "the high consumption" ? 100mA? 2A ?

If you feel a post has answered your question, please click "Accept as Solution".
rib.1
Associate II

Good morning AScha,

basically according to the datasheet of the device i am working on which is based on stm32wle5 microcontroller its battery life could be up to 10 years

with my setup I have an average consumption of 90mah with the switch closed.

putting a resistor across the PA8 pin to lower energy consumption and in fact with a resistor of 470k I got 390 microAh in sleep mode. but with such current the pin does not detect the change on the open/close switch.

my question is as follows.

I would need to lower the consumption when the switch is closed.

is there any suggestion you can give me at physical(hardware) or fostware layer for that goal

gbm
Lead III

Connect the switch between the MCU input and GND. Either use 0.5..1 MOhm permanent external pullup resistor or use periodic RTC interrupt to turn on the internal pullup, check the button state and turn off the pullup to conserve energy.

AScha.3
Chief II

..or simply put the 470k in the right position 

cpu pin now :input without any pulldown/-up. so it makes about 5 uA loss.


_legacyfs_online_stmicro_images_0693W00000bhrGLQAY.png

If you feel a post has answered your question, please click "Accept as Solution".