Deep sleep mode reset the board?
-
@amartinez
Yes, it work like a reset -
-
@RobTuDelft
Then question is why? If it run onlymain.pywithoutboot.py
this would suggest that something initialized in boot.py is remembered - and I do not suppose that was the case but .. -
@RobTuDelft
i tested this and it is not true.
boot.pyis run after deepsleep>>> machine.deepsleep(500) I (2279094) wifi: state: run -> init (0) I (2279094) wifi: n:9 2, o:9 2, ap:9 2, sta:9 2, prof:9 I (2279095) wifi: station: 7c:dd:90:4c:b5:9f leave, AID = 1 I (2279097) wifi: n:9 0, o:9 2, ap:9 2, sta:9 2, prof:9 I (1499) wifi: wifi firmware version: 90b1b8b I (1500) wifi: config NVS flash: disabled I (1500) wifi: config nano formating: disabled I (1516) wifi: Init dynamic tx buffer num: 32 I (1516) wifi: wifi driver task: 3ffd5690, prio:23, stack:3584 I (1516) wifi: Init static rx buffer num: 10 I (1518) wifi: Init dynamic rx buffer num: 0 I (1522) wifi: Init rx ampdu len mblock:7 I (1526) wifi: Init lldesc rx ampdu entry mblock:4 I (1531) wifi: wifi power manager task: 0x3ffdaa4c prio: 21 stack: 2560 I (1537) wifi: sleep disable I (2526) wifi: wifi timer task: 3ffdbac8, prio:22, stack:3584 I (2529) wifi: Init ampdu: 0 I (2529) wifi: mode : softAP (24:0a:c4:00:6e:c3) boot 29.73803 100170.1 286.3341 main -
@livius Okay, thanks for testing. It was my understanding, but it seems incorrect.
That also means the docs on this matter should be clearified:
Execution is resumed from the main script
That should say resumed from boot script in this case. -
@RobTuDelft I guess a fair question is, will the hardware and system software "remember" whatever was set in boot.py?
-
@papasmurph
No, at now it start from clear point -
@livius So that means that serial port bit rate, WiFi access etc must be set in main?
-
@papasmurph
You can do this in boot - it start same as removing power - you start from clear point.
Look below conversation -boot.pyandmain.pyare run again after wake up from deepsleep -
Pin states can be remembered through deepsleep using
pin.hold([hold]). That might be handy? -
Hi...i am a new user here. As per my knowledge Pin states can be remembered through deepsleep using pin.hold([hold]). Also you can do this in boot it start same as removing power ,you start from clear point.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login