Giter Club home page Giter Club logo

Comments (3)

ivankravets avatar ivankravets commented on May 30, 2024

I've just removed this extra second from PIO Core: platformio/platformio-core@30ff491

Could you try dev build?

pip install -U https://github.com/platformio/platformio-core/archive/develop.zip

from platform-atmelavr.

Rantanen avatar Rantanen commented on May 30, 2024

Works way better. Removing the 1 second delay made the upload around 5.5 seconds faster :)

After the reset it seems that RPiZero takes around 500 ms to re-initialize the port. This caused following events to happen during the loop.

0 ms:    PlatformIO: Store current ports, reset and sleep for 1 second.
100 ms:  Raspberry: /dev/ttyAMC0 disappears due to reset
400 ms:  Raspberry: /dev/ttyAMC0 reappears after the reset
1000 ms: PlatformIO: Check the ports. Upload thinks the /dev/ttyAMC0 it sees is the old one.
6000 ms: Timeout on the loop, uses /dev/ttyAMC0

Removing the 1 sec delay allows PlatformIO to recognize that the port disappeared after the reset and then around 500 ms it correctly recognizes the new port and breaks out of the loop:

0 ms:    PlatformIO: Store current ports, reset and sleep for 1 second.
100 ms:  Raspberry: /dev/ttyAMC0 disappears due to reset
250 ms:  PlatformIO checks the ports. Recognizes /dev/ttyAMC0 is gone.
400 ms:  Raspberry: /dev/ttyAMC0 reappears after the reset
500 ms:  PlatformIO checks the ports. Sees the new /dev/ttyAMC0 and uses that.

Definitely keep the fix. :)

from platform-atmelavr.

ivankravets avatar ivankravets commented on May 30, 2024

@Rantanen thanks a lot for detailed info and report!

from platform-atmelavr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.