Shop OBEX P1 Docs P2 Docs Learn Events
How long does it take to load firmware from flash? possible to speed up? — Parallax Forums

How long does it take to load firmware from flash? possible to speed up?

ababkinababkin Posts: 7
edited 2008-08-14 04:11 in Propeller 1
Just as subject says. Using the $20 prop proto board with the at24c512 flash chip

New to prop. My application requires reasonably fast power-on start-up time (i.e the firmware has to start running within 100-300 milliseconds from power-on). If the startup is slower, is there a way to speed it up? I read in one of threads about speculation to clock the i2c faster (1Mhz?). I would upgrade the eeprom chip if necessary (will have to do it anyway to get into automotive rated temperatures)

tried searching but no luck

Thanks
Alex

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2008-08-13 20:24
    The power-on load time from EEPROM is pretty well fixed and is done using the Prop's internal clock. However, you might be able to speed up the process by using a small micro to upload a tiny bootload program via the PropPlug header. The bootloader could then read the EEPROM at full speed. Since the PropPlug header has no Vdd connection, you'd need a flying lead to power anything plugged into it.

    -Phil

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    'Still some PropSTICK Kit bare PCBs left!
  • ababkinababkin Posts: 7
    edited 2008-08-13 20:59
    Thanks Phil

    Can you perhaps elaborate on your proposed solution? How much faster can i make it?
    Is there an application note explaining the process of Prop interacting over the Plug? I can see on schematic it simply uses two other io pins for the plug. Is it possible to control the speed of loading up the firmware from the outside of the prop? (i.e isn't the speed of upload fixed and predetermined internally?)

    Thanks again
    Alex
  • Mike GreenMike Green Posts: 23,101
    edited 2008-08-13 21:12
    I believe what Phil is suggesting is using some kind of small microcontroller that pretends to be the Propeller Tool and downloads a small program to the Propeller from the internal flash of the small microcontroller. The download protocol is documented, but not well documented and two implementations exist, a downloader written in Spin and one in Python.

    The idea would be that the small program would be able to then copy a complete program from the EEPROM to RAM at full I2C speed, then start up a Spin interpreter. I'm not sure how much time this would save. The only other documentation on the bootloading process is the source code of the bootloader which has been posted.

    The bootloader protocol and the format of the serial data is designed to work in the absence of an accurate timebase (crystal clock), so it uses a ratiometric scheme which is less efficient than straight asynchronous serial data.
  • hippyhippy Posts: 1,981
    edited 2008-08-13 21:39
    @ Phil : That's another of your brilliant ideas.

    At 1MHz I2C bus speed the full 32KB could be read in around 300ms. Using the program header information at $0004-$000F, it's not necessary to load the full 32KB, only up to start of Stack, in most cases only up to start of Variables and that will be correspondingly quicker for many programs.

    Page 18 of the Propeller Manual 1.01 does add some caveats. There's a 100ms delay after power-on to reset. Page 20 shows power-up delay as 10ms, the Propeller Datasheet suggests none but isn't clearly stated so who knows which is right ? There's also an additional 50ms delay period all agree on.

    Assuming 100ms power-on plus 50ms delays, 16KB should be loaded and running in around 300ms.

    Loading from a traditional bus Eeprom with a counter to do addressing would speed things up. One could even interface the micro itself that way so Propeller Boot Eeprom not even needed.

    Post Edited (hippy) : 8/13/2008 9:46:29 PM GMT
  • BaggersBaggers Posts: 3,019
    edited 2008-08-13 22:12
    If SPEED starting is what you need.

    Why use I2C, if you have more pins available, why not split it up, and use parallel comms, since parallel tasks is what the prop is all about [noparse]:)[/noparse] or if you have 10, why not go 8bit bus + 2 control bits, then it'd be filled in no time at all [noparse]:)[/noparse]
    obviously, you'd have to use phil's idea to send a small boot app, which then reads from more IO's.

    Baggers.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    http://www.propgfx.co.uk/forum/·home of the PropGFX Lite

    ·
  • jazzedjazzed Posts: 11,803
    edited 2008-08-13 22:17
    From what I've seen so far "small bootloader" is an oxymoron.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • ababkinababkin Posts: 7
    edited 2008-08-14 01:59
    Thanks again guys

    I will look around the website, but i would really appreciate links to the documents needed to implement this bootloading over the prop plug port
    So far i went through the datasheet and the protoboard doc and there was nothing on that

    Cheers
    Alex
  • jazzedjazzed Posts: 11,803
    edited 2008-08-14 03:29
    For the time being such a design is stuck in our imaginations. Knowing the good folks here, you won't have to wait too long for direction.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • Mike GreenMike Green Posts: 23,101
    edited 2008-08-14 04:11
    Look in this thread index under "Non windows development" for "Propeller loader"
    http://forums.parallax.com/showthread.php?p=609066

    Also look at "Propeller development for non-Windows users"
Sign In or Register to comment.