2023-08-28 09:51 PM - last edited on 2023-08-29 03:50 AM by Houda GHABRI
Hi,
I work with low power sleep mode in stm32 and it is sleep mode works well in our programme.MCU goes sleep mode after 5 seconds and wakup for external interrupt pin to connect for MCU wake up.But I need a output for MCU sleep for 1 min without ADC function and I wakeup the MCU to ADC value to increase to wake the MCU. If any possibilities to use ADC value to wakeup the MCU. If anyone know help for us. I attach my code. This code work well.
2023-08-29 01:26 AM
2023-08-29 10:09 PM
Hi Diane,
your reply I can't understand pls tell about clearly
2023-08-29 11:33 PM
I think @Diane POMABIA was asking which stm32 processor you’re using. Different families have different limitations. What are you experimenting with? Just saying e.g. stm32L4xx (if you haven’t finally decided on a particular one) will direct answers to that family.
A way it might work is to leave the real-time clock RTC running while the processor core is sleeping, and have RTC trigger a wakeup interrupt. Your code would have to use the respond to that interrupt by e.g. reading the ADC and deciding whether to go back to sleep.
Some stm32 families have ADCs that can wake the processor if the input exceeds a threshold. Although I remember reading this in a Reference Manual for a particular stm32, I’ve never used that feature and I don’t know the restrictions.
Do read the Reference Manual for your stm32. It describes all the features ST added to the Arm processor core.