Shop OBEX P1 Docs P2 Docs Learn Events
SPI flash dilemma - Page 6 — Parallax Forums

SPI flash dilemma

12346

Comments

  • AribaAriba Posts: 2,682
    edited 2016-09-28 06:56
    Do you expect that someone presses the Reset button while the code writes to the Flash?
    This is like pulling out an SD card or an USB-Stick while the PC writes to it. Something will go wrong.

    In such a situation I find it acceptable that the user needs to press the Reset button again if the first reset not booted correct. Or that it waits for the next Watchdog timeout if a Wathdog has interrupted the write/erase (what never should happen in good code).

    Andy
  • AribaAriba Posts: 2,682
    cgracey wrote: »
    ...

    It seems now like it comes down to either a variable pin gap in the different flash hookups, or an MSB-LSB inversion on the data pins, which will cause pin growth to go cleanly from the top-down, but needs a REV instruction periodically to reverse the bits. Both ways are fine with the streamer.

    If you connect IO0..IO3 backwards to avoid the gaps, you can only read back the data in the same mode that you have written it.
    If you for example write in 1-bit SPI mode and read it back in Quad mode, every nibble of the databytes is bitreversed.

    Andy
  • Cluso99Cluso99 Posts: 18,069
    edited 2016-09-28 07:37
    cgracey wrote: »
    Cluso, from all the stuff I've seen, when CSn goes high, DO floats within a few nanoseconds.
    Me too.

    But I have found that NOT to be the case with SD Cards :(
    So extra clocks have to be given after CSn goes high!

    We will still have middle pins 57 & 58 spare if we use SD.

    I'd rather have the bits sequenced correctly, and not require a REV instruction periodically. But that is just a preference.

    What do you still think about allowing I2C EEPROM ? It's just a pullup check on CLK, and only requires 2 pins leaving the whole lower 4 free. And it can co-exist with FLASH or SD. And those new BGAs are tiny (just slightly smaller than 0403 imperial, so wider than an 0402 resistor/capacitor but the pads are underneath). And the SOT23-5 are easily hand soldered at 0.95mm pitch.

    So, this is my preferred software sequence... (presumes my pinout, else change Pxx numbers to suit)
    1.      P63=SI=1 ?              Y: Try booting from serial
    2.      Pullup on P60 CLK ?     Y: Boot from I2C
    3.      Pullup on P61 CSn ?     Y: Boot from FLASH SPI
                                          If reply on P56 DI/DO joined - 3bit mode
                                          If reply on P57 DI separate  - 4bit mode (could be DSPI or QSPI)
    4.      Pullup on P59 CSn ?     Note: SD Card requires >1ms delay after power up!
                                    Y: Set P61=DI=1, P60=CLK=0, P59=CSn=1, give >74 clocks, then P59=CSn=0, give >74 clocks,
                                       Send CMD0 & check reply=$01 ?
                                       Y: SD Card found, continue init sequence.
    5.      Serial Debug Mode???           
    

  • Cluso99Cluso99 Posts: 18,069
    edited 2016-09-28 07:40
    Ariba wrote: »
    cgracey wrote: »
    ...

    It seems now like it comes down to either a variable pin gap in the different flash hookups, or an MSB-LSB inversion on the data pins, which will cause pin growth to go cleanly from the top-down, but needs a REV instruction periodically to reverse the bits. Both ways are fine with the streamer.

    If you connect IO0..IO3 backwards to avoid the gaps, you can only read back the data in the same mode that you have written it.
    If you for example write in 1-bit SPI mode and read it back in Quad mode, every nibble of the databytes is bitreversed.

    Andy
    Andy,
    Chip means REV the nibbles before outputting them, and again REV when reading them back in.
  • cgraceycgracey Posts: 14,133
    edited 2016-09-28 08:01
    I don't think I2C is worth messing with, as it is SLOW. There is a lot more data likely needing to be read in for a P2 than for a P1. At higher densities, I2C is not cost competitive, at all, with SPI flash. I say forget about it. It's not practical for P2.

    I'm having a hard time accepting the pin ghetto. I'd really like things to be high and tight.

    Just thinking, but wouldn't it be possible to support SPI flash and SPI SD in a single 4-pin group?
    if pull-up on pin 61 then try SPI flash
    else if pull-up on pin 59 then try SD card
    
    	pin	flash	SD
    	pin	2-bit*	1-bit
    	---------------------------------
    	61	CSn	MOSI
    	60	CLK	CLK
    	59	DQ1/DO	CSn
    	58	DQ0/DI	MISO
    	
    * HOLDn and WPn are tied high on the SPI flash
    

    That would give 2-bit SPI reading for 20MB/s. It would not pretend to be able to do 4-bit SD.
  • jmgjmg Posts: 15,148
    cgracey wrote: »
    I'm having a hard time accepting the pin ghetto. I'd really like things to be high and tight.

    Aesthetics are nice, but not at the cost of technical performance.
    cgracey wrote: »
    That would give 2-bit SPI reading for 20MB/s. It would not pretend to be able to do 4-bit SD.

    Loosing 4-bit is a significant cost to pay for cosmetic reasons....
    There is also Octal-versions of SPI that should be Streamer- compatible, either as 2 x QuadSPI, or the new Adesto ECOXIP parts.
    Boot does not need to read octal, but it should be able to extend the nibble on a PCB that uses 8b SPI.


  • Cluso99Cluso99 Posts: 18,069
    cgracey wrote: »
    I don't think I2C is worth messing with, as it is SLOW. There is a lot more data likely needing to be read in for a P2 than for a P1. At higher densities, I2C is not cost competitive, at all, with SPI flash. I say forget about it. It's not practical for P2.

    I'm having a hard time accepting the pin ghetto. I'd really like things to be high and tight.

    Just thinking, but wouldn't it be possible to support SPI flash and SPI SD in a single 4-pin group?
    if pull-up on pin 61 then try SPI flash
    else if pull-up on pin 59 then try SD card
    
    	pin	flash	SD
    	pin	2-bit*	1-bit
    	---------------------------------
    	61	CSn	MOSI
    	60	CLK	CLK
    	59	DQ1/DO	CSn
    	58	DQ0/DI	MISO
    	
    * HOLDn and WPn are tied high on the SPI flash
    

    That would give 2-bit SPI reading for 20MB/s. It would not pretend to be able to do 4-bit SD.

    Certainly you could support either Flash or SD, and determine it by the pullup on the relevant CSn pin.

    It's not possible to support both on the same 4 pins, but I don't see this as an issue at all.

    With the alternative below, under initial boot conditions the pins would be in the same direction so no possible conflicts if the pullup got misdetected.

    Of course, others will suggest you then swap 58 & 59 (below) to get QSPI, but the downside is DPI and QSPI will both need bit reversals ;)
    if pull-up on pin 61 then try SPI flash
    else if pull-up on pin 58 then try SD card
    
            P2            flash           SD
            pin           2-bit*          1-bit
            ----------    -------------   --------
            61  out       CSn    in       MOSI in
            60  out       CLK    in       CLK  in
            59  in /io    DQ1/DO out/oi   MISO out
            58  out/io    DQ0/DI in /oi   CSn  in
            
    * HOLDn and WPn are tied high on the SPI flash
    
    Ray
  • jmgjmg Posts: 15,148
    Ariba wrote: »
    Do you expect that someone presses the Reset button while the code writes to the Flash?

    No, but in the field glitches can arrive any time....
    Ariba wrote: »
    In such a situation I find it acceptable that the user needs to press the Reset button again if the first reset not booted correct. Or that it waits for the next Watchdog timeout if a Wathdog has interrupted the write/erase (what never should happen in good code).
    There may be no user...
    If there is a repeating Watchdog then that may be ok, but a SW reset may not be able to multi-try once control passes to ROM.
    So best if the recovery is more managed, and less a dice-roll.

    Easy enough to field test a Busy poll, and see if it has any issues.

  • jmg wrote: »
    dMajo wrote: »
    BTW, QPI supports 66/99 but I think you should give them in 4bit, as per QPI instructions table.
    CMD    66h,  99h 
    CLK  # 0  1  2  3 
     IO0 = 0, 0, 1, 1
     IO1 = 1, 1, 0, 0
     IO2 = 1, 1, 0, 0
     IO3 = 0, 0, 1, 1
    
    The Winbond & Macronix data I have, does not mention your 'QPI', but they do give wave forms showing a 1-bit 0x66,0x99 reset, so I am following the vendor data here.
    Given the strict adjacent command caveats they apply, to me that makes this a separate reset state engine. Makes sense.
    Keeps it away from any Dual-Quad modes.

    datasheet, page 79
    http://www.winbond.com/resource-files/w25q128fv rev.m 05132016 kms.pdf
    clearly indicates 66/99 sequence for SPI and QPI. For SPI is intended SPI,SDI, SQI. This do not depend on QE setting. When you enter QPI mode with command 38h you have switched command receiving fron 1b to 4b thus the reset (66/99h) must be given in 4b format.

    BTW cypress reset is F0h only, in SPI (1b) because they do not support QPI
  • jmg wrote: »
    cgracey wrote: »
    By testing for these possibilities, there's no need for pull-ups, because when we get to the 4-pin test, we can drive HOLD# and WP#.
    I was just wary about hard-drive situations.
    Cluso has mentioned SD cards that take some clocks before they release pin-drive, even with CS=H.
    I guess if you tristate until drive is needed, then drive and test, then tristate as quickly as possible, any pin contention may be tolerable. (ie Drive OE is pretty much CS aligned)
    I've understood from Cluso that the SD remains with the active drive even without CS and that he needs to issue some clocks pulses in this condition to make the card release the output.

    SD and Flash could share the CLK signal. You can start by issuing a series of CLK pulses with all the CS signals not asserted to eventually stop the SD driving the output.

  • Rayman wrote: »
    This might work.

    One thing I'm not clear on is if the $FF command has to be given SQI style or can be SPI style.
    If SPI style always works, then it's fine.
    Otherwise, guess we need external pullups on DQ2 and DQ3.
    We just need to bios then to strobe CK a few times with CS down and DI and DO high to give the $FF command to exit SQI mode...

    for SQI (commands 1bit, data 4bits) FF will work. For QPI (commands 4bit, data 4bit) you need to drive/pull-up high DQ1,DQ2,DQ3 while transmitting ones on DQ0(DI). You probably need to drive hidh CS after 2 bits on DI, which with the 3 pull-ups forms the 2 nibbless for "FF". So I think is better issuing 2 clocks with DI high, then pulse high CS and then issue 8 clocks with DI high
  • jmgjmg Posts: 15,148
    dMajo wrote: »
    SD and Flash could share the CLK signal. You can start by issuing a series of CLK pulses with all the CS signals not asserted to eventually stop the SD driving the output.

    Yes, that is worth testing.

  • jmgjmg Posts: 15,148
    dMajo wrote: »
    .... So I think is better issuing 2 clocks with DI high, then pulse high CS and then issue 8 clocks with DI high
    Yes, I have given that sequence in the suggested preamble in the other thread.
    (plus the 0xffff case for exit Dual mode for full coverage )

  • cgracey wrote: »
    Cluso99 wrote: »
    Chip,
    What is wrong with this format?
    P2_BOOT_HW_SW.jpg

    I know that the pins 56..63 have holes when not used.
    But why is that a really BIG deal. I respect that its not ideal, but its quite efficient in lots of ways. We have the same issue with P1 when P30..31 are not used, when P28..P29 (EEPROM) are used.

    Now, if you really want to conserve pins, then just use an I2C EEPROM. You can go from a tiny 24C32/24AA32/24LC32/24FC32 with ~0.8x0.7mm WLSCP4 4pin BGA, SOT23-5, MSOP8, TSSOP8, SOIC8, DIP8, and DFN/QFN parts. They grow to 24x64, 24x128, 24x256, 24x512, 24x1024, 24M01 (as they grow in capacity, the smaller packages are not available, at least yet anyway). Since the smaller packages are new parts, I would expect that to continue thru the larger capacity as tie goes by. The boot code only needs to read the first 4K of EEPROM and execute it, then if that code wants more, it can do it.

    I2C only uses 2 pins, is readily understood, reasonably cheap, and can co-exist with either FLASH (SPI/DSPI/QSPI) or SD (SPI or Native Quad).
    In my schematic above, I2C can be detected simply by software checking for a pullup on the CLK pin (and SDA pin if you wish, although unnecessary). This does mean a pullup on CLK is required ! - I always put a pullup on CLK even tho' the P1 does not require it for your boot protocol.

    So this would get us...
            Serial    I2C EEPROM 24xxxx series
    P63     SI
    P62     SO
    P61               SDA (5K-10K pullup)
    P60               CLK (5K-10K pullup)
    P59               -spare-
    P58               -spare-
    P57               -spare-
    P56               -spare-
    
    And as a bonus, they are in the same order as the top 4 pins on P1 :)

    Now, let's add FLASH to the equation, either with or without EEPROM. With EEPROM, then it will control the FLASH, so no requirement to worry about pinouts at all :)

    If FLASH only, then...
            FLASH 3pin              FLASH 4pin              FLASH 6pin
    P63     
    P62     
    P61     nCS (5K-10K pullup)     nCS (5K-10K pullup)     nCS (5K-10K pullup)
    P60     CLK (no pullup)         CLK (no pullup)         CLK (no pullup)
    P59     -spare-                 -spare-                 D3/nHOLD
    P58     -spare-                 -spare-                 D2/nWP
    P57     -spare-                 MISO/D1 (to P2)         D1/MISO
    P56     DI/DO (joined)          MOSI/D0 (fm P2)         D0/MOSI
    

    Now, let's add SD to the equation. If there is EEPROM, then we boot from that, and end of storey, else if there is FLASH 3/4/6 pin, we boot from that. Otherwise, no EEPROM and no FLASH, we try SD.
            SD SPI 4pin             SD std 6pin             
    P63     
    P62     
    P61     MOSI/DI (no pullup)     CMD/MOSI/DI (no pullup)
    P60     CLK     (no pullup)     CLK         (no pullup)
    P59     nCS     (** pullup)     D3/nCS      (** pullup)
    P58     -spare-                 D2                 
    P57     -spare-                 D1                 
    P56     MISO/DO (to P2)         D0/MISO/DO (to P2) 
    ** An external 10K pullup is optional. An internal pullup can be detected if the SD Card is plugged in.
    

    While this leaves us with some spare pins in the middle, it does mean that the D0..D3 are in the corret order for Quad Mode, which IMHO is more important.

    For a minimal system, use I2C EEPROM. There is virtually no delay in looking for it, because it can be detected by the external pullups.

    To me, this seems so simple, yet with future expansion in mind.

    Okay, Cluso. What about this:
    If pull-up on pin 61 then search for SPI flash:
    
    		flash	flash	flash
    	pin	1-bit*	2-bit*	4-bit
    	---------------------------------
    	61	CSn	CSn	CSn	
    	60	CLK	CLK	CLK
    	59	DI+DO	DQ1/DO	DQ3/HOLDn
    	58	z	DQ0/DI	DQ2/WPn
    	57	z	z	DQ1/DO
    	56	z	z	DQ0/DI
    	
    * HOLD# and WP# are tied high on the SPI flash
    
    
    If pull-up on pin 59 then check for SD card:
    
    		SD		SD
    	pin	1-bit		4-bit
    	---------------------------------
    	61	MOSI/DI		CMD/MOSI/DI
    	60	CLK		CLK
    	59	CSn		D3/CSn
    	58	MISO/DO		D2
    	57	z		D1
    	56	z		D0/MISO/DO
    

    This is like what you posted, but with pins kept tight. It allows for gapless pin usage in cases where the customer knew that they only wanted to connect one type of memory. Do you see any problems with this?

    These pin orientations are all optimal for the streamer, too. Nothing is reversed.
    Chip, your sentence says that as opposite there will be users wanting multiple type of memory. How will flash and SD coexist id when driving FLASH.DI you at the same time gives SD.CS and opposite.
    Should't SD and FLASH share only the clock and data signals but have separate CS? This will require a pin more, but perhaps serial.RX can be shared with common.CLK to save it. Giving CLK pulses to the pcb devices while serially receiving shouldn't hurt anything because the devices are all deselected (CS=high). And between the P2.RX&CLK and the FTDI.TX can be a series resistor to avoid collisions when P2 outputs CLK
  • Ariba wrote: »
    cgracey wrote: »
    ...

    It seems now like it comes down to either a variable pin gap in the different flash hookups, or an MSB-LSB inversion on the data pins, which will cause pin growth to go cleanly from the top-down, but needs a REV instruction periodically to reverse the bits. Both ways are fine with the streamer.

    If you connect IO0..IO3 backwards to avoid the gaps, you can only read back the data in the same mode that you have written it.
    If you for example write in 1-bit SPI mode and read it back in Quad mode, every nibble of the databytes is bitreversed.

    Andy
    And in case of SD where the media is removable and could be read by other systems? Or if someone makes a removable flash daughterboard?
  • cgraceycgracey Posts: 14,133
    dMajo, I didn't think about the SPIflash/SD conflict in my proposal. Sorry about that.

    I think it would be better not to repurpose the serial pins, though. We don't know about half-duplex until we get the commands on RX. So, it has to be assumed for the flash/SD that TX (pin 62) is not available.
  • cgraceycgracey Posts: 14,133
    dMajo wrote: »
    Ariba wrote: »
    cgracey wrote: »
    ...

    It seems now like it comes down to either a variable pin gap in the different flash hookups, or an MSB-LSB inversion on the data pins, which will cause pin growth to go cleanly from the top-down, but needs a REV instruction periodically to reverse the bits. Both ways are fine with the streamer.

    If you connect IO0..IO3 backwards to avoid the gaps, you can only read back the data in the same mode that you have written it.
    If you for example write in 1-bit SPI mode and read it back in Quad mode, every nibble of the databytes is bitreversed.

    Andy
    And in case of SD where the media is removable and could be read by other systems? Or if someone makes a removable flash daughterboard?

    For those reasons, it would be important to keep the data properly justified.
  • Cluso99Cluso99 Posts: 18,069
    edited 2016-09-28 11:33
    I also think serial should remain on P62/63 as 2 pins.

    As for FLASH vs SD, as far as I am concerned, it is fine to just support one or the other. For users who want/require both, then they should boot from FLASH. They can use any combination of pins, shared or not, to support their SD.

    My reasoning for supporting SD was to remove the requirement of having to use FLASH to boot to SD. This is what I have to do in P1 because there is no other way.

    FWIW, my Prop OS detects all my various boards, and the locations of the SD card and optional SRAM. It's not difficult. I share pins in different ways. This part should be left to the user to decide... Either have and boot from FLASH, or no FLASH and boot from SD, else serial of course.

    Postedit: My Prop OS is readable on PC's via USB/SD adapter or SD slot. I can also transfer files to/from the PC over the serial/usb link. I can even program the EEPROM from a file, or make a file from EEPROM, all on the P1. With my RamBlade hardware it even runs CPM2.2 with heater's ZiCog, and can transfer files back and forth between FAT and CPM. I even have Michael Park's spin/pasm P1 compiler running although it's not been robustly tested.
    I am saying this because I expect similar, but better, on P2. I just don't need, nor want, FLASH as I can boot straight to SD which can be setup from my PC (Windows, but I know *nix can also do it).
  • cgracey wrote: »
    dMajo, I didn't think about the SPIflash/SD conflict in my proposal. Sorry about that.

    I think it would be better not to repurpose the serial pins, though. We don't know about half-duplex until we get the commands on RX. So, it has to be assumed for the flash/SD that TX (pin 62) is not available.

    Chip, I edited immediately after posting, perhaps you don't read the lattest.

    I meant RX of propeller being shared with clock. I thought that sharing TX is not good because you can use these 2 pins for serial comm in the user program independently of that that the prop has booted from flash/sd.
    If you share TX, in a setup where serial port is present with the storage devices, that means you will always be serially transmitting something while driving clock. Sharing RX will keep the clock not entering the serial channel. At worse you will lose some serial packets in incoming directions. The host can resend these packets after some delay, or the user, with the user code can drive additional free IOs for serial hw handshake purpose. A serial resistor between usb/serial converter (TX) and prop RX pin can safeguard from output conflicts between the two pins.
  • Cluso99Cluso99 Posts: 18,069
    edited 2016-09-28 11:58
    Please leave the P63/62 alone for serial SI/SO. These same pins can be used for our USB direct connect. My latest P1 boards have the required resistors, etc in place for this. They can also be used for 1pin PS2 Keyboard and 1pin TV (mono generated by the VGA section for composite video) - I do this on the P1.
    So P63/62 have their own uses, besides loading code. And they are the constant part of most P1 designs, together with the P28/29 EEPROM pins, which can also be shared BTW.

    On P1, I share SDA & CLK with OEn & WEn on SRAM, and CEn gets shared between SRAM and SD. I use 19 pins for address pins to the SRAM, and 8 pins for the Data on SRAM (which also get shared with SD).
  • RaymanRayman Posts: 13,918
    It's probably better to not have SD in ROM.
    SQI flash support is already taking up a lot of pins.
    Or, have it so SD is only supported in the case of SPI only flash with shared DI/DO.

    The smallest member of P2 family looks to only have 16 I/O pins.
    Do we really want to dedicate a bunch of those to different boot options?
  • David BetzDavid Betz Posts: 14,511
    edited 2016-09-28 15:43
    Rayman wrote: »
    It's probably better to not have SD in ROM.
    SQI flash support is already taking up a lot of pins.
    Or, have it so SD is only supported in the case of SPI only flash with shared DI/DO.

    The smallest member of P2 family looks to only have 16 I/O pins.
    Do we really want to dedicate a bunch of those to different boot options?
    Maybe the smaller members of the P2 family could be limited to 3 and 4 pin boot? I guess even 4 is a quarter of the pins on the smallest version.

  • cgraceycgracey Posts: 14,133
    David Betz wrote: »
    Rayman wrote: »
    It's probably better to not have SD in ROM.
    SQI flash support is already taking up a lot of pins.
    Or, have it so SD is only supported in the case of SPI only flash with shared DI/DO.

    The smallest member of P2 family looks to only have 16 I/O pins.
    Do we really want to dedicate a bunch of those to different boot options?
    Maybe the smaller members of the P2 family could be limited to 3 and 4 pin boot? I guess even 4 is a quarter of the pins on the smallest version.

    Exactly. That is my concern. What we need is reliable boot in just a few pins. We can do it in three.
  • cgracey wrote: »
    David Betz wrote: »
    Rayman wrote: »
    It's probably better to not have SD in ROM.
    SQI flash support is already taking up a lot of pins.
    Or, have it so SD is only supported in the case of SPI only flash with shared DI/DO.

    The smallest member of P2 family looks to only have 16 I/O pins.
    Do we really want to dedicate a bunch of those to different boot options?
    Maybe the smaller members of the P2 family could be limited to 3 and 4 pin boot? I guess even 4 is a quarter of the pins on the smallest version.

    Exactly. That is my concern. What we need is reliable boot in just a few pins. We can do it in three.
    So limit the tiny variants of P2 to 3 pin boot and allow the other options only on the larger variants?

  • Cluso99Cluso99 Posts: 18,069
    edited 2016-09-28 20:20
    cgracey wrote: »
    David Betz wrote: »
    Rayman wrote: »
    It's probably better to not have SD in ROM.
    SQI flash support is already taking up a lot of pins.
    Or, have it so SD is only supported in the case of SPI only flash with shared DI/DO.

    The smallest member of P2 family looks to only have 16 I/O pins.
    Do we really want to dedicate a bunch of those to different boot options?
    Maybe the smaller members of the P2 family could be limited to 3 and 4 pin boot? I guess even 4 is a quarter of the pins on the smallest version.

    Exactly. That is my concern. What we need is reliable boot in just a few pins. We can do it in three.

    Or 4 with SD as an either/or with FLASH. ie either FLASH or SD, but not both for booting.

    That is why I also suggested 2 pins with the tiny EEPROM. Just enough to allow the P2 to boot from something else, like WiFi, etc. The pins can be shared with either FLASH or SD if required. At least EEPROM is a known entity, only 2 pins, cheap at the bottom end 24LC64 0.239/5K for WLSCP4 (BGA), 0.253/2K5 for SOT23-5, and 511-M24128SFCU6T/T 128Kb/16KB 0.307/2K5 for WLSCP4, all at Mouser.
    863-CAT24C512YI-GT3 TSSOP8 0.398/3K.
    It is only the ROM space required to boot from EEPROM, by testing for a pullup on CLK so it's quick. The rest is a known quantity.
  • jmgjmg Posts: 15,148
    cgracey wrote: »
    Exactly. That is my concern. What we need is reliable boot in just a few pins. We can do it in three.
    You can also do it in one, if you include one-pin Serial, or 2 if you include i2c :)


  • cgraceycgracey Posts: 14,133
    edited 2016-09-28 20:40
    As booting from a memory device goes, I think exclusively SPI flash or SD card would be good. I don't know if there's really much reason to make the two things coexist simultaneously on the same pin map, if it causes any conflicts. One or the other would be fine. The boot ROM could try SPI flash first, since it's simpler and faster, and then check for an SD card. I'm sorry I've been around and around with this, but I don't think we have the right solution, yet.
  • jmgjmg Posts: 15,148
    cgracey wrote: »
    As booting from a memory device goes, I think exclusively SPI flash or SD card would be good. I don't know if there's really much reason to make the two things coexist simultaneously on the same pin map, if it causes any conflicts. One or the other would be fine. The boot ROM could try SPI flash first, since it's simpler and faster, and then check for an SD card. .
    That sequence makes sense.
    If someone does want to pin-overlap & use both in a design, they have Flash, so can map their own SD overlay.
  • RaymanRayman Posts: 13,918
    If we require that the other 3 QPI data pins need external pullups, then that could be a test as to whether it is connected or not.
    That way, you could avoid doing anything on those pins if any of them were pulled down...
  • Cluso99Cluso99 Posts: 18,069
    cgracey wrote: »
    As booting from a memory device goes, I think exclusively SPI flash or SD card would be good. I don't know if there's really much reason to make the two things coexist simultaneously on the same pin map, if it causes any conflicts. One or the other would be fine. The boot ROM could try SPI flash first, since it's simpler and faster, and then check for an SD card. I'm sorry I've been around and around with this, but I don't think we have the right solution, yet.
    jmg wrote: »
    cgracey wrote: »
    As booting from a memory device goes, I think exclusively SPI flash or SD card would be good. I don't know if there's really much reason to make the two things coexist simultaneously on the same pin map, if it causes any conflicts. One or the other would be fine. The boot ROM could try SPI flash first, since it's simpler and faster, and then check for an SD card. .
    That sequence makes sense.
    If someone does want to pin-overlap & use both in a design, they have Flash, so can map their own SD overlay.

    +1

    But we are going to need to test the booting of both FLASH and SD before you put it out in files.

    Chip,

    What is the current state of the Boot ROM in release 11b ?
    ie What does it do? Do we require a FLASH device present?

    I want to be able to load P2 code (without reloading/repowering the FPGA board) to test the SD Card (on other pins initially) to confirm everything works fine at least for me before I release it into the wild for testing.

    I would presume the same will be required for FLASH testing. I have S25FL116X here to test when Boot FLASH code is ready for download & test.

    Maybe we don't need something external to boot from (which is why I suggested EEPROM on the other thread even if it does not make it into the final Boot ROM, even tho' I think it would make a great reliable option)

Sign In or Register to comment.