chacal / stm32sleep

Helper library for using Stop & Standby modes with STM32duino
MIT License
20 stars 11 forks source link

Creating an interrupt based on I/O activity #6

Open Jipolie01 opened 5 years ago

Jipolie01 commented 5 years ago

Awesome library.. I'm trying to use the stop mode to lower power consumption. The only problem is that I want to use the activity of a pin to wake up (only PB12 to be exact) instead of sleeping a certain time. The STM32F103 documentation says stopmode will react to anything happening on the EXTI line, which from what I understand PB12 is a part of. Does this happen automatically or is there a function in this library that can be used for this.

OlliHenri commented 5 years ago

Hi, I´m fighting with Arduino cores STM32GENERIC and Arduino_STM32-master. one has the Timer/interrupt lib and the other the Lowpower lib.

My project is to use BluePill as engine room MCU on my sailing vessel to send sensor readings to central ESP32 and Can-Bus NMEA. It is crucial to use as low power as possible, like on any Boat/batterie run projects. The combination of user friendly timer/interrupt lib in STM32GENERIC and STM32LowPower enables us to use all the power of STM32 with the used current less than AVR. Do you know how to adapt this lib to send the STM32 into sleep/ deepsleep/stop mode and when waked up by interrupt for example on A0 pin (wakeup) to jump to callback routine and after continue the program without any reset. Or any solution more user friendly to switch to LowPower deepsleep / stop mode? and continue program flow from returnpoint.

I was looking to do that but ended up void...

-Oliver-