Shop OBEX P1 Docs P2 Docs Learn Events
P2 SPI FLASH — Parallax Forums

P2 SPI FLASH

pic18f2550pic18f2550 Posts: 392
edited 2021-01-31 17:29 in Propeller 2

Hello,

is there a list of which types can still be used?

I have only found this one. 25Q128JVSIM


Thank you.

Comments

  • cgraceycgracey Posts: 14,133
    edited 2021-01-28 15:03

    I think any of the 16MB flash chips which take 3-byte addresses should work. In my flash programmer, I only used the 4KB and 64KB block-erase commands, avoiding the 32KB block-erase command, since not all chips support it. I used at least four different data sheets. I think we've been using Winbond chips, since they are the most available and affordable.

  • RaymanRayman Posts: 13,800

    I've used SST26VF064BT from Microchip and it works.

  • Why do 16Mb chips have to be used when 512Kb would do.

  • 16MB chips do have to be used -- Parallax anticipated application storage on the flash, and given the low cost of these devices went with 16MB.

  • cgraceycgracey Posts: 14,133

    If you just want to boot your code and don't care about future SSD use of the extra 15.5MB, you can use a 512KB flash, or even a much smaller one, as long as it's big enough to hold your code.


    Like Jon said, though, Parallax will always use a 16MB flash for future reasons.

  • jmgjmg Posts: 15,140

    Anything with a 3 byte address can be used , but notice that the cheapest flash parts start above 512k, so currently 2~4MBit Flash is the lowest cost at about 7c/500

  • Hello cgracey,

    in fact I only need the code for one COG. :)

    The rest is reloaded via a WLAN modul from FTP.

    What makes me think is that the 16Mb Flasch uses a 3 byte addressing.

    Or does that not play a role in the data transfer, on the part of P2

  • jrm, da habe wir uns überschnitten.

    danke

    500 sind ein bisschen zu viel vom guten.

    Ich brauch nur 3. :)

  • cgraceycgracey Posts: 14,133

    It only needs the 3-byte address for programming, actually, using our flash programmer that is downloaded from PNut/PropTool. For booting, a standard read command $03 is issued and bits are read out of the flash chip. Any SPI flash chip can do that and is, therefore, bootable. So, the 3-byte address is really just a programming issue, not a booting issue.

  • OK now I understand some things better.

    For the programming process, a program is loaded on the P2.


    - 3 byte addressing

    - 4KB or 64KB block-erase commands


    What is still missing is the minimum clock frequency

  • OK here I found the W25Q128JVSIM.

    4x W25Q128JVSIM + Shipping

    4 * 1.91 + 4.93 = US$ 12.75

    Thanks now I know what to look for.

  • What is still missing is the minimum clock frequency

    I think it' the P2's RCFAST divided by two. That's up to 25 MHz, so the flash should at least support 12.5 MHz

  • AribaAriba Posts: 2,682

    As ManAtWork found out, there are chips that don't work. See here:

    What is still missing is the minimum clock frequency

    The P2 boots with the internal RCfast oscillator (20+ MHz), the SPI clock is a fraction of that, so the slowest parts should more than fast enough.


    Andy

  • cgraceycgracey Posts: 14,133


    This is correct.


    I will review the Microchip datasheet.

  • RaymanRayman Posts: 13,800
    edited 2021-01-29 12:54

    Just for reference, I had an issue with FTDI's EVE3 GPU chip not working with my flash chip...

    Like with P2, there was no table of supported chips to be found anywhere...

    When I asked support about it, they gave me this list:

    Appears to support every type of chip I know of, except the Microchip type I was using...

    But, this was only for QPI mode. My chip did appear to work in SPI mode...

  • cgraceycgracey Posts: 14,133
    edited 2021-01-29 23:49

    I discovered the problem with the Microchip flash chip.


    When given the Bulk-Erase command ($D8), it does not always erase 64KB, like the others. The first and last blocks are erasable in only 8KB or 32KB chunks, with the 64KB blocks in the middle:


    So, if we only used the Sector-Erase command ($20), which only erases 4KB, our flash loader would properly program the chip, but very slowly. This chip will boot okay, but our current flash programmer won't program it, due to this erasure peculiarity.

  • Ok, good to understand the reasons. Thanks, Chip

  • RaymanRayman Posts: 13,800

    Microchip worked for me, but maybe I was using the flexprop toolchain

  • cgraceycgracey Posts: 14,133

    If your download is under 16KB, then the flash programmer in PNut will just issue 4KB Sector-Erase ($20) commands, instead of any Bulk-Erase ($D8) commands.

  • RaymanRayman Posts: 13,800

    I just flashed a 291 kB binary using FlexProp to Microchip flash and it appears to have worked...

  • Cluso99Cluso99 Posts: 18,066


    Thanks Chip. It's probably the same as I discovered using the S25FL256 when trying to do a chip erase with TAQOZ. I needed to do 4K erase blocks.

    BTW this is the part on one of the RetroBlade2's I sent to you/Ken. It has internal pullups on WP and HOLD pins.

  • On the problem with the ChipErase, binn I with my programmer also already encountered.

    Some were only deleted after repeated ChipErase.

    I suspect that here the software write protection makes problems.

    If I remember correctly, the program is transferred to write on the chip, from the PC to the P2.

    Maybe in the programming tool, a preselection of problem chips, the situation could relax something.

Sign In or Register to comment.