Skip to main content
rib.1
Associate II
April 6, 2023
Question

GPIO CONFIGURATION

  • April 6, 2023
  • 4 replies
  • 1757 views

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

This topic has been closed for replies.

4 replies

AScha.3
Super User
April 6, 2023

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
rib.1Author
Associate II
April 11, 2023

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
April 11, 2023

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.

My STM32 stuff on github - compact USB device stack and more: https://github.com/gbm-ii/gbmUSBdevice
AScha.3
Super User
April 11, 2023

..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""."