tenbaht / sduino

An Arduino-like programming API for the STM8
http://tenbaht.github.io/sduino/
GNU Lesser General Public License v2.1
351 stars 218 forks source link

Can sduino use sleep mode? #63

Closed segatecm closed 5 years ago

segatecm commented 5 years ago

I have a project used sduino. I need the STM8S in sleep mode and wake up by GPIO interrupted. Can I use set_sleep_mode (SLEEP_MODE_PWR_DOWN) or something to do it? Thanks.

tenbaht commented 5 years ago

Sorry, that is not implement yet. But it would be very useful, so it should go on the list. Could you maybe post your findings if you manage to get the sleep mode working? I would love to include that into the system.

segatecm commented 5 years ago

Hi tenbaht. I am a new hand to stm8. I want to make some help but I can't. If you make it work I can try it, and thanks for your work.

jay-ramani commented 2 years ago

@segatecm, did you find a workaround? Asking since the issue is closed. Not sure if it has been implemented.

jay-ramani commented 2 years ago

Ok, I found something - use wfi (wake for interrupt) or halt.

Hope this helps others tripping on the same.

chirag-uAtech commented 10 months ago

Ok, I found something - use wfi (wake for interrupt) or halt.

Hope this helps others tripping on the same.

I am trying to implement the same. But am unable to find any documentation on this. It would be very helpful if you could share some easy steps for a newbie to implement this.