Shop OBEX P1 Docs P2 Docs Learn Events
Boot Sequence I would need some help — Parallax Forums

Boot Sequence I would need some help

AnubisbotAnubisbot Posts: 112
edited 2008-02-10 17:34 in Propeller 1
Hi All...

I know a lot of you will say, look around in the forum.
I did and found a lot of information, but it seams , i am to dump to understand them.

Ok first of all here is what i am planing to do.( Have to do!!!)

I need to write in VB express 2008 a class, what does the loading of a program file to the Prop eerom.
So like the VB Loader here in the forum. But i need it as a class so i can use it in later projects and in Dark Basic Pro.

I got the Boot Sequence here in front of me, what i have found here on the net.


PC: set 115200-8-N-1
DTR low
wait at least 10ms
DTR high
wait 100ms (+-10% tolerance)
send $F9 (%0100111111 timing calibration)


LFSR: taps = $B2, initialy = "P"
send bitwise LFSR[noparse][[/noparse]250] ($FF/$FE)
send $F9[noparse][[/noparse]250+8] for bitwise responses ($FE/$FF)
receive bitwise LFSR[noparse][[/noparse]250] + version[noparse][[/noparse]8] within 50ms
if timeout or mismatch, done (hardware not found error)
send encoded command long (up to 3 bits sent per serial byte):


0 = shutdown
1 = load ram, then run
2 = load ram+eeprom+verify, then shutdown
3 = load ram+eeprom+verify, then run

if command 0, done (okay)

send encoded length long
send encoded data longs
send $F9 every 10ms for bitwise response(s):


if command 1-3, receive bitwise checksum pass/fail within 10(?) seconds
if timeout, done (connection error)
if checksum fail, done (checksum error)

if command 1, done (okay)

if command 2-3, receive bitwise program pass/fail within 5 seconds
if timeout, done (connection error)
if program fail, done (program error)
receive bitwise verify pass/fail within 2 seconds
if timeout, done (connection error)
if verify fail, done (verify error)
done (okay)



Right now i dont understand the parts in bold. Can some one explain the processes a bit more simple or other words.
Ok what i undestand is that i load the file in an array in this case LFSR [noparse][[/noparse]250] and i have to send it bitwise but what is ($FF/$FE).
If some one could help that would be great. Since my brain is already burning...

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-02-10 16:52
    The $F9 / $FE / $FF stuff has to do with the way the Propeller has to do timing during the bootloading process. The bootloader has to assume that there's no crystal or resonator or other external clock, so it's running off the internal RCFAST clock which is uncalibrated and drifts a bit over time. The bootloader uses the bit timing of the serial data coming in to set the timing. The initial bytes received look like 1,1,0,1,0,0,1,1,... where the initial "1"s are the idle state of the line. The first "0" is the start bit of the character and the next bits are the LSB to MSB of the $F9 (11111001). Subsequent data is sent one bit per character using either 1,0,1 or 1,0,0,1. I think the two zero bits represents a zero bit value and one zero bit represents a one bit. I may have it backwards. Anyway, $FF will produce a single zero bit (the start bit) while $FE will produce two zero bits. During the actual program download, 3 data bits can be packed into one 8 bit byte (9 bits including the start bit) for transmission.

    Look through one of the bootloaders ... either the one in Spin or in Python and you'll see how this works.

    Look under "Propeller loader" in Graham Stabler's thread index (http://forums.parallax.com/showthread.php?p=609066)
  • AribaAriba Posts: 2,685
    edited 2008-02-10 17:26
    Have you found this Thread?:
    http://forums.parallax.com/showthread.php?p=670593

    Its a discussion about this F9 FE FF thing, and I have posted a picture there that shows what's going on.

    Andy
  • deSilvadeSilva Posts: 2,967
    edited 2008-02-10 17:34
    I posted something very cool about the theory behind self-clocking signals, but as this is a little bit theoretical, I will not search for the link now..
Sign In or Register to comment.