Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

    Deep sleep mode reset the board?

    Scheduled Pinned Locked Moved LoPy
    deepsleeplopysleep
    12 Posts 5 Posters 3.7k Views 5 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A Offline
      amartinez Pybytes Beta
      last edited by

      Hi everyone,

      It's a simple question:

      • Does the deep sleep mode reset the board? I' m asking this because I' m not sure if I have to store the variables into a SD card or not, because I understand that if the deep sleep reset the board, then the variables will be clean, isn't it?

      Thanks.

      L 1 Reply Last reply Reply Quote 0
      • L Offline
        livius @amartinez
        last edited by

        @amartinez
        Yes, it work like a reset

        think about people first, then computers

        1 Reply Last reply Reply Quote 0
        • RobTuDelftR Offline
          RobTuDelft
          last edited by

          It will start at main.py, so boot.py will be skipped. In that way it is different than a hard reset or power cycle, since that also runs boot.py.

          Without data you're just another person with an opinion.
          Hackster | About me

          L papasmurphP 3 Replies Last reply Reply Quote 0
          • L Offline
            livius @RobTuDelft
            last edited by

            @RobTuDelft
            Then question is why? If it run only main.py without boot.py
            this would suggest that something initialized in boot.py is remembered - and I do not suppose that was the case but ..

            think about people first, then computers

            1 Reply Last reply Reply Quote 0
            • L Offline
              livius @RobTuDelft
              last edited by

              @RobTuDelft
              i tested this and it is not true.
              boot.py is 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
              

              think about people first, then computers

              RobTuDelftR 1 Reply Last reply Reply Quote 0
              • RobTuDelftR Offline
                RobTuDelft @livius
                last edited by

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

                Without data you're just another person with an opinion.
                Hackster | About me

                1 Reply Last reply Reply Quote 0
                • papasmurphP Offline
                  papasmurph @RobTuDelft
                  last edited by

                  @RobTuDelft I guess a fair question is, will the hardware and system software "remember" whatever was set in boot.py?

                  L 1 Reply Last reply Reply Quote 0
                  • L Offline
                    livius @papasmurph
                    last edited by livius

                    @papasmurph
                    No, at now it start from clear point

                    think about people first, then computers

                    papasmurphP 1 Reply Last reply Reply Quote 0
                    • papasmurphP Offline
                      papasmurph @livius
                      last edited by

                      @livius So that means that serial port bit rate, WiFi access etc must be set in main?

                      L 1 Reply Last reply Reply Quote 0
                      • L Offline
                        livius @papasmurph
                        last edited by livius

                        @papasmurph
                        You can do this in boot - it start same as removing power - you start from clear point.
                        Look below conversation - boot.py and main.py are run again after wake up from deepsleep

                        think about people first, then computers

                        1 Reply Last reply Reply Quote 0
                        • RobTuDelftR Offline
                          RobTuDelft
                          last edited by

                          Pin states can be remembered through deepsleep using pin.hold([hold]) . That might be handy?

                          Without data you're just another person with an opinion.
                          Hackster | About me

                          1 Reply Last reply Reply Quote 2
                          • L Offline
                            LulaNord
                            last edited by LulaNord

                            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.

                            pcb assembly

                            1 Reply Last reply Reply Quote 1

                            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
                            • 1 / 1
                            • First post
                              Last post

                            Pycom on Twitter

                            Pycom