[SOLVED] SST25VF020B direct programming with JFlashSPI troubleshooting

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • [SOLVED] SST25VF020B direct programming with JFlashSPI troubleshooting

    Hello,

    the setup consists of a custom board with a MCU the SST25VF020B SPI-Flash and an ADC on the same SPI bus.
    Now a Flasher Compact should be used to program the SPI-Flash directly. While programming the chip select of the ADC is pulled HIGH and the Flasher Compact holds the MCU in reset.

    Auto detection of SST25VF020B does not work, so I manually configured it.
    Reading the JEDEC ID works and reading of the flash content also seems to work.
    The MCU is already programmed and can write/read to/from the SPI-Flash.

    But I have trouble to get erasing and writing to work correctly.
    When erasing with Target > Erase Sectors some bytes get not reset. This seems to be bytes at the 0x1000 boundary (e.g. 0x10000, 0x13000)
    Erasing with Target > Erase Chip only outputs - Could not erase chip, no flash selected..
    Writing to the flash does nothing, but it warns me, that the programming area is not completely empty.

    I attach the JFlashSPI project and hope someone can point me in the right direction.

    PS: In the project I tried to reset BP0 and BP1 with the init steps, because I suspected that JFlashSPI does not remove the write protection, but without success.

    Thanks
    rengl
    Files
  • The write problem is probably caused by the missing page program mode of the SST25VF020B.
    It got only a byte program mode and an AAI program mode (Auto Address Increment).
    Both don't fit the protocol the Flasher assumes.

    Flasher:
    cmd| addr | addr | addr | data0 | data1 | data2 | … | datan-1

    SST25VF020B AAI program mode:
    cmd | addr | addr | addr | data0 | data1 | cmd | data2 | data3 | … | cmd | datan-2 | datan-1

    SST25VF020B byte program mode:
    cmd| addr | addr | addr | data0 | cmd | addr | addr | addr | data1 | … | cmd | addr | addr | addr | datan-1

    On the SEGGER Website [1] I found, that the SST25VF020 is supported by the Flasher Compact.
    This Flash is nearly identical and is also missing the page program mode and has the same AAI and byte program modes.

    So my question now is if the Flasher Compact really supports the flash.

    [1] segger.com/supported-devices/search/SST25VF020