Shop OBEX P1 Docs P2 Docs Learn Events
Loading Propeller — Parallax Forums

Loading Propeller

Andrey DemenevAndrey Demenev Posts: 377
edited 2010-01-26 03:04 in Propeller 1
Is there a formal specification of Propeller loading protocol? I need external micro (AT90USB162, to be precise) to load program into Propeller. I could translate PropellerLoader.spin into C 1:1, but a formal specification would help a lot in debugging.

Comments

  • KyeKye Posts: 2,200
    edited 2010-01-24 04:16
    Eh, I can give you the bootloader. It shows what's going on in the chip.
    Parallax probably will not provide a formal specification however, don't count on it.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Nyamekye,
  • Andrey DemenevAndrey Demenev Posts: 377
    edited 2010-01-24 04:19
    Kye, thanks a lot. That is helpful
  • Andrey DemenevAndrey Demenev Posts: 377
    edited 2010-01-24 14:07
    OK, I have figured out the protocol. I can post it if someone is interested
  • BradCBradC Posts: 2,601
    edited 2010-01-24 14:47
    Andrey Demenev said...
    OK, I have figured out the protocol. I can post it if someone is interested

    Yes please.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Life may be "too short", but it's the longest thing we ever do.
  • Andrey DemenevAndrey Demenev Posts: 377
    edited 2010-01-24 14:52
    Hi Brad

    I would never think you could learn anything from me about loading Propeller lol.gif
  • BradCBradC Posts: 2,601
    edited 2010-01-24 16:07
    Andrey Demenev said...
    Hi Brad

    I would never think you could learn anything from me about loading Propeller lol.gif

    The day I stop learning things is the day they fill in the hole [noparse]:)[/noparse]

    My father has a saying I'm fond of. "I don't have a mortgage on wisdom"

    So, yes, while I've managed to get a propeller to load once or twice, I'd be *really* interested in seeing your take on it if you have the time to write it down.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Life may be "too short", but it's the longest thing we ever do.
  • Andrey DemenevAndrey Demenev Posts: 377
    edited 2010-01-25 05:40
    Here are my findings. The information is based on analysis of Propeller bootloader and PropellerLoader.spin, and is not guaranteed to be error-free. I have run some tests using AT90USB162 as host.

    Post Edited (Andrey Demenev) : 1/25/2010 6:08:33 AM GMT
  • Bob Lawrence (VE1RLL)Bob Lawrence (VE1RLL) Posts: 1,720
    edited 2010-01-25 05:43
    @Kye

    re:booter.spin

    I was wondering what LFSR was referring to in the booter.spin file but I think I found it in this book " CODES: THE GUIDE TO SECRECY FROM ANCIENT TO MODERN TIMES"
    "
    Linear Feedback Shift Registers A linear feedback shift register (LFSR) is a mechanism for providing fast number generation, but is not cryptographically secure. We provide a brief description here for completeness and to illustrate why it is both fast and insecure, yet is a building block for more secure schemes. An LFSR is comprised of three parts.

    1. A shift register of length - ∈ N, consists of a sequence of - registers (memory
    cells) labelled 0, 1, 2, . . . , - − 1, each capable of holding one bit and each
    having one input and one output.

    2. A tap sequence is an --tuple of bits:
    (c1, c2, . . . , c),
    with c = 1.

    3. A state sj , of the LFSR is the bit string describing the contents of the registers for states numbered, j ∈ {0, 1, . . . , - − 1}, given by
    sj = (k(−1,j)k(−2,j) . . . k(0,j)), namely, register i has bit k(i,j) in state j, so the first coordinate of the subscript denotes the register, and the second coordinate determines the state of the bit. For instance, the initial state is given by the bit string, s0 = (k(−1,0)k(−2,0) . . . k(0,0)), called the seed. "

    and it would work with this Delphi function ;

    // Iterate LSFR
    function IterateLFSR: byte;

    begin
    Result := LFSR and $01;
    LFSR := LSFR sh1 and $FE or (LFSR shr 7 xor LFSR shr 5 xor LFSR shr 4 xor LFSR shr 1) and 1;
    end;
  • KyeKye Posts: 2,200
    edited 2010-01-25 06:12
    Interesting.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Nyamekye,
  • Andrey DemenevAndrey Demenev Posts: 377
    edited 2010-01-26 02:18
    What I have described as "Link reliability check" is most likely not reliability check, just could not find better description. Any ideas?
  • BradCBradC Posts: 2,601
    edited 2010-01-26 03:04
    Andrey Demenev said...
    What I have described as "Link reliability check" is most likely not reliability check, just could not find better description. Any ideas?

    Well, it serves 2 distinct purposes.
    First, it ensures it is really a propeller (or something pretending to be one) on the end of the wire.
    Second, it dies if there are communications reliability problems.

    ... so, I suspect "Link reliability check" is as good a description as any.

    Nice document btw [noparse]:)[/noparse]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Life may be "too short", but it's the longest thing we ever do.
Sign In or Register to comment.