Improve boot time
-
-
@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? -
@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.
-
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-consumptionI did not perform tests with development FW 1.19.0 yet and the source of the issue remains unclear.
-
@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.
-
@jcaron Just for completion other boot times:
- WIPy3 (clone): ~1.8 s.
- FiPy: ~1.95 s
So it#s all in the same range.
-
@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?
-
@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. -
@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.
-
@jcaron With version 1.14.0.b1 I get 1.6 seconds.
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