View Full Version : Updating the firmware in a two propeller project?

Jim Fouch
02-17-2007, 02:10 AM
I'm thinking of a new design for my bike video display. One that uses two Props (more power & tons of IO).

I'm also looking at using a SD card to download user's settings. I was thinking of allowing users to download onto the SD card·new firmware for the device. One ROM file for each prop.

Both Props would share the IO lines to the SD interface. The Props will communicate w/ each other thru a serial port to share data and manage sharing the SD interface.·On startup, Prop A would look for a new firmwareB.rom file and if exists, program PropB and rename the file. Then pass control to PropB which would read the SD and find a file firmwareA.rom and program PropA.

Is this possible? I haven't yet interfaced to an SD card, but have a connector from Sparkfun.



Mike Green
02-17-2007, 02:18 AM
Rokicki's SD card drivers (in the Object Exchange) work quite well and should help you do what you want.

02-17-2007, 02:24 AM
I would be careful about having two props simultaneously accessing the SD card for write. For read you're okay,
but clearly for write there are problems; both props could grab the same cluster at the same time and then you've
got a munged filesystem. Even with only one writing, the one reading may see "bad data" since it may have
cached a block that's modified by the other.

Sharing the interface should work fine as long as you figure out a good way to arbitrate. You'll need both props
on the same board (probably) since you don't want to run long wires with the SD signals. You'll have to be very
careful about glitching the lines on handover.

In terms of building a modular, robust system, you may be better served having a single prop controlling the
SD card and loading both itself and the slave prop. You can then use a few wires (SPI or whatever you want) with
your own NFS-like protocol if the other prop needs access to the card.

Jim Fouch
02-17-2007, 02:49 AM
For now, I was planning on using two Proto boards. Later they will be on one board.

By having the props reprogram each other if we loose power and spooge the eeprom's data, the other prop will always be there to reporgram it back. This way it's almost impossible to BRICK the unit.