Propeller Loader
cgracey
Posts: 14,155
This object lets you load/program one Propeller from another·Propeller·(instead of a PC).
This function may be a little early for most users, but·the object·demonstrates how ABORTs are used - they can get you all the way out of deep mess in a snap.
I will augment this object later for loading an array of Propeller chips (ie. the old Propeller Supercomputing thread).
·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chip Gracey
Parallax, Inc.
Post Edited (Chip Gracey (Parallax)) : 6/14/2006 6:35:34 AM GMT
This function may be a little early for most users, but·the object·demonstrates how ABORTs are used - they can get you all the way out of deep mess in a snap.
I will augment this object later for loading an array of Propeller chips (ie. the old Propeller Supercomputing thread).
·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chip Gracey
Parallax, Inc.
Post Edited (Chip Gracey (Parallax)) : 6/14/2006 6:35:34 AM GMT
Comments
What's the deal with the 500-bit exchange from the LFSRs? Checking that you're talking to the right device and that the link is working?
Is the bitrate here fixed, or derived from the initial synchronization pulse?
Chip Gracey
Parallax, Inc.
Neat. Everything I'd want to program from (my workstations and my robot's central controller) have UARTs, so this should be straightforward.
(You must have been very worried about false-triggering to use such a grandiose handshake. )
This is sweet!
I guess it might be time for me to get the second propeller onto the breadboard and make-em co-work!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Just tossing my two bits worth into the bit bucket
KK
·
Sorry to nag!
But, Please consider:
No form of Intelligence is Artificial! And that All forms of Intelligence·are Real!
It's not the Intelligence that's Artificial!
It's the thinking medium that's not biological in it's nature. (IE. Silicon·compared to biological Carbon based organisms.)
One day, soon, machines and their Intelligence will be indistinguishable from human intelligence.
The Turing test will be passed.
Please consider the term, "Machine Intelligence", instead.
Check out the book' "GROWING UP WITH LUCY: How To Build An Android In Twenty·Easy Steps", By STEVE GRAND
and or the book,·"CREATION: Life and How·to Make It", ALSO BY STEVE GRAND
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
IAI (Indigenous Alien Intelligence),
The New View on Machine Intelligence.
Because There is nothing Artificial about it!
Believe me, I'm already thinking about genetic programming on this beast. Being able to load a new image without hitting an EEPROM could make for some seriously fast generations.
I would really like to get the PropellerLoader.spin code working but I am having trouble just before the chip version exchange section.
I inserted some debugging code and cannot get past the following section without an abort ErrorConnect.
'receive and verify LFSR pattern
repeat 250
if WaitBit(1) <> IterateLFSR
So, calibration, LFSR send work, I fail at LFSR receive and don't get to the chip version exchange.
I followed the hardware setup for BOEn and the VSS tied 1M resistor as well as different combinations of clock PLL speeds (this shouldn't matter as only the internal RC is used during bootup right?) including the default internal one.
There seems to be no problem with either 40 pin dip, I set BOEn back to VSS and temporarily connect the 2nd propeller to its' own eeprom and prop plug and it works fine using two separate propeller tool IDE's. The PropellerLoader.spin in this configuration only resets prop2 which then boots normally from eeprom if p31/p32 serial comm fails as described in section 3.1 of the propeller datasheet.
thank you
/michael
If you must add debugging information, create another thread to handle processing debugging information. The Propeller Tool has a dedicated thread which handles nothing but the downloading process so that system calls do not affect it's timing.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Post Edited (Paul Baker) : 1/8/2009 7:57:30 PM GMT
Sounds very useful.
Regards,
Tim
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBlade,·RamBlade,·SixBlade, website
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: CPUs Z80 etc; Micros Altair etc;· Terminals·VT100 etc; (Index) ZiCog (Z80) , MoCog (6809)
· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
http://forums.parallax.com/showthread.php?p=758971
/michael
Post Edited (Michael O'Brien) : 11/21/2009 2:00:18 AM GMT
#0, Shutdown, LoadRun, ProgramShutdown, ProgramRun
I figured ProgramRun would take the binary file you include and dump it onto the props eeprom.
And then that prop would run its program.
I can get LoadRun to work, but it will not program the props eeprom.
I looked at the code in propeller loader, and it looks as if the code is incomplete for program modes "ProgramShutdown, ProgramRun"
Can anyone confirm this?
Oh, and about the wiring of props with proploader, I did it with 55 props that get parallel programmed when wired right.
http://forums.parallax.com/showthread.php?127983-55-Parallax-Propeller-s-Parallells-Processing-of-Permanent-Perturbations.
Remember that the loader is for the "master" Propeller. It only sends the program to the other Propeller (along with the programming mode value). The "slave" Propeller's bootloader (in ROM) does the rest of the work.
That was a very nice answer! I truly believe that answer should be added to object within this thread and the OBEX to make it "GOLDEN" Or at least I think it is in the OBEX.
It is already a very nice object, but that clarification should be made within the spin file.
Bruce
EDIT: I added that description to my copies of that file.
I am receiving non readable character from my set up.
Connection: PC <-> Proto board (master) <---> Slave (Prop DIP on breadboard)
The slave blinks LED and it seems to be working.
But characters I type in PST are coming back strange.
Image:
Image from PST:
Master Loader.spin:
(Calls loader sends bytes from slave to PC and PC to slave)
Code loaded into slave with eeprom (no xtal) :::: Serial_Loopback.spin
And if you post code please use [noparse] [/noparse] tags.
How can I monitor the slave sqwave? Is there an object??
VG.
For measuring the frequency simply generate a square wave on the slave side (use a counter or the Synth object which is part of the PropTool library) and you can use [thread=123170]Bean's frequency counter[/thread] on the master side.
Update: or simply try all possible frequency values from 8..20MHz in say 500kHz steps and go from there. At some point the master should get it.
Just in case you have not realised, the manual is available in the help section of PropTool (it's downloaded as part of the PropTool set of info, including some demo programs and tutorials)
-Phil
Preference is of course not to route high frequency clock signals.
Its amazing what old threads can dig up and remind you of. The download mechanism can be faster to boot than eeprom loading because the download is only for the length of the data whereas the eeprom is always 32KB, plus the fact that the download has to timeout.
The other interesting bit to look at is the fixed locations at the beginning of the binary. The length is contained within this.
BTW: Did you note Chip provided for revisions/versions of the Prop chip. Amazing we still have only 1 version - meaning no revisions due to bugs. Take a look at the AVRs etc to see the revisions, and these are only variations of families of chips and they often run to Rev E.
I used the following code to sense the frequency:
SLAVE on pin 26
Master: Bean's "Freq Counter Simple.spin" code. Thank you Bean.
My output is around
3900 only.
I was expecting in the range of 8Mhz to 12Mhz. This is way below. Did I miss something.
VG
FWIW, with your NCO setup you should see clkfreq/2 so something around the 6M mark. Also, how do you have your setup wired (signal/GND)?
VG.
With the propeller internal boot code, that first 150ms timeout, to get 250 bits, is the biggest speed hurdle to pass. The rest of the boot code will extend the timeout when the boot code sends bits and revives longs.
I found a mention of the T1 and T2 pulses used:
http://forums.parallax.com/archive/index.php/t-86311.html
Chip mentioned in the thread:
It looks like the pulses would need to be much faster than 10ms to get the first 250 bits to the propeller before it hits the 150ms timeout.
Some code from the boot loader. Note that the timeout is reset after getting a long, but not a bit. The first 250 bits are received as bits not longs, so there is no time extension.
booter.spin: http://forums.parallax.com/showthread.php?101483-Propeller-ROM-source-code-HERE
Rocky
I would like to do this so when I compile my objects do also. (my object i include is the program I want to run in spin form)
I developed this by connecting a QuickStart board target (J1 VSS(39), VDD(38), RESn(37), P31(35) and P30(33)) to a breadboard 40PIN DIP host (VSS, VDD and pins 0, 1 and 2) (using jumper wires). I didn't modify either BOEn or RESn on the QuickStart so it doesn't comply with Chip's recommendation. However, by continuing to control RESn, it seems to work as expected.
I haven't really decided how I'll fit this with other things, but I know I'm not using EEPROMs (so LoadRun is hardcoded) and the pins are in variables (I'll probably pass them in through par at some point.)
As my first post to this forum, excuse any errors in convention.