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

    Improve boot time

    Scheduled Pinned Locked Moved LoPy
    lopy4powerlow powerduty cycleboot time
    19 Posts 7 Posters 2.5k Views 9 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.
    • robert-hhR Offline
      robert-hh @jcaron
      last edited by

      @jcaron I tested the boot time on a LoPy4 and a LoPy1 as the time between the rising edge of Reset and a Pin pulse cause by a few lines in boot.py. This time is 1.97 seconds. From then on, control is by the user scripts.

      S 1 Reply Last reply Reply Quote 0
      • S Offline
        Sympatron @robert-hh
        last edited by

        @robert-hh said in Improve boot time:

        @jcaron I tested the boot time on a LoPy4 and a LoPy1 as the time between the rising edge of Reset and a Pin pulse cause by a few lines in boot.py. This time is 1.97 seconds. From then on, control is by the user scripts.

        Does that mean that ~2s is the absolute minimum boot time or do you know of any why to speed it up it further?
        Is the boot time for LoPy1 and 4 the same?

        robert-hhR 1 Reply Last reply Reply Quote 0
        • robert-hhR Offline
          robert-hh @Sympatron
          last edited by robert-hh

          @sympatron As far as I can tell, this is the minimum boot time, unless you start to tweak the firmware. And to my surprise, lopy1 and lopy4 are the same. I should say, that the firmware version is 1.18.1.r1.

          1 Reply Last reply Reply Quote 0
          • D Offline
            danielm
            last edited by

            This is the thread where I described the issue with boot time being longer for FW 1.18.0 in comparison to FW 1.14.0.b1 while running the same code:
            https://forum.pycom.io/topic/3377/fw-1-18-0-increased-boot-time-power-consumption

            I did not perform tests with development FW 1.19.0 yet and the source of the issue remains unclear.

            J 1 Reply Last reply Reply Quote 1
            • J Offline
              jcaron @danielm
              last edited by

              @danielm Thanks.

              There was indeed a 300 ms increase in boot time between the two, but the total boot time remained under a second.

              I wonder how long it actually takes to load and compile a relatively simple script such as OP's, and how long it takes for the various imports.

              robert-hhR 1 Reply Last reply Reply Quote 0
              • robert-hhR Offline
                robert-hh @jcaron
                last edited by

                @jcaron Just for completion other boot times:

                • WIPy3 (clone): ~1.8 s.
                • FiPy: ~1.95 s

                So it#s all in the same range.

                J 1 Reply Last reply Reply Quote 0
                • J Offline
                  jcaron @robert-hh
                  last edited by

                  @robert-hh Can you reproduce @danielm 's second test in that thread? I'm surprised he got about 500 or 800 ms depending on the firmware version and you get nearly 2 seconds. Unless you're importing some module that really takes a long time to load, but he already had imports of machine, pycom and os.

                  @danielm What device where you using in those tests? I guess a LoPy or LoPy 4?

                  robert-hhR D 3 Replies Last reply Reply Quote 0
                  • robert-hhR Offline
                    robert-hh @jcaron
                    last edited by robert-hh

                    @jcaron The only import I had is machine for the Pin to signal the presence of boot. And obviously the stuff from _boot.py:

                    # _boot.py -- always run on boot-up, even during safe boot
                    import os
                    from machine import UART
                    os.dupterm(UART(0, 115200))
                    

                    I removed that and got 1.77 seconds.
                    Now, with these line, the LoPy4 shows 1.87 seconds. But after all, not a big variation.

                    1 Reply Last reply Reply Quote 0
                    • D Offline
                      danielm @jcaron
                      last edited by

                      @jcaron
                      I think it was L01 because the application from the first post in that thread was written for sensor based on L01.

                      In all tests the application was frozen during firmware build time.

                      1 Reply Last reply Reply Quote 0
                      • robert-hhR Offline
                        robert-hh @jcaron
                        last edited by

                        @jcaron With version 1.14.0.b1 I get 1.6 seconds.

                        1 Reply Last reply Reply Quote 0

                        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