Giter VIP home page Giter VIP logo

Comments (5)

Obijuan avatar Obijuan commented on July 17, 2024

I have seen the iceprog code.

In the function flash_wait() there is a 250ms delay (at the end):

usleep(250000);

I have changed it to 10ms:

usleep(10000);

The result is that now it only takes 4 sec on the Laptop A:

$ time sudo ./iceprog scicad1.bin
init..
cdone: high
reset..
cdone: low
flash ID: 0x20 0xBA 0x16 0x10 0x00 0x00 0x23 0x12 0x67 0x21 0x23 0x00 0x21 0x00 0x43 0x04 0x11 0x11 0x5F 0x7D
file size: 32220
erase 64kB sector at 0x000000..
programming.............
reading..
VERIFY OK
cdone: high
Bye.

real 0m3.495s
user 0m0.004s
sys 0m0.088s

I will test on the laptop B and tell you the result

from icestorm.

cliffordwolf avatar cliffordwolf commented on July 17, 2024

I have changed it to 10ms:
usleep(10000);

Ok, that makes sense of course.

The 250 ms are a copy&paste error. I've now set to to 1 ms.

from icestorm.

Obijuan avatar Obijuan commented on July 17, 2024

Great! thanks! :-) I`ve also tested the icestick connected directly to the USB port: I got the same result than using an USB hub and an extension cable: 33sec (just for having more information). So the bug seems to be that copy&paste error

Thanks a lot Clifford! ;-)

from icestorm.

CarlosGS avatar CarlosGS commented on July 17, 2024

I just tested this fix, turning the value to 1ms, and it does bring the programming time down from 33.707s to 1.957s in my i5 laptop (with Fedora). Great find Juan!!! 👍

from icestorm.

Obijuan avatar Obijuan commented on July 17, 2024

Value set to 1ms: It takes 2.1sec. Awesome!

from icestorm.

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.