Need a new thread :)
P2 has the following preferred pins...
P63 = RXD serial
P62 = TXD serial
P61 = SPI_CS
P60 = SPI_CLK
P59 = SPI_DQ = SPI_DO
P58 = (optional SPI_DI)
P61 = Pullup = load from attached SPI FLASH or SPI SD
P60 = Pullup = and program loaded successfully, run SPI FLASH program
Now, because there are now (and possibly more) SPI commands for the FLASH that may interfere with the SD setup, I propose we define an alternative...
P60 = Pulldown = used to determine SPI SD attached and if loaded successfully run SPI SD program
By testing the pullups and pulldowns before selecting the FLASH or SD, the boot code can determine whether FLASH or SD is attached. This is an either/or case. Both FLASH and SD is not being considered at this point. Both may work, but we are not necessarily catering for it now because there is insufficient time to ensure it works correctly.
So we have...
load = | | FLASH | FLASH | SD |
boot = | Serial | FLASH | Serial | SD |
P61 = | none | pullup | pullup | pullup |
P60 = | xxxx | pullup | none | pulldown |
If P61=pullup and P60=pullup/none, we could try FLASH and if not found, then try SD.
IMHO there is no need to have a load SD and then goto serial because we can remove the SD card if the code is faulty.
I am presuming here that serial will be used to start Tachyon. Chip/Peter will need to confirm.
Why couldn't COG #0 be started to look for serial while COG #1 is started to try and load FLASH/EEPROM ?