Set QSPI on S25FL512 mode after Programming

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

  • Set QSPI on S25FL512 mode after Programming

    Hi, we have a S25FL512 flash device connected to ZYNQ processor to QSPI interface for normal operation (see attached diagram as reference)

    We also have a direct programming connector to the SPI/QSPI bus for flash programming, so that we could program the flash in SPI mode directly, but at the end of programming we need to SET the FLASH in QSPI mode writing the Configuration Register bit[1].
    Does anyone been able to program the Flash Configuration register using J-FLASH?

    thanks in advance
    Cristian
    Images
    • Zynq-flah_connection.png

      23.37 kB, 703×621, viewed 1,676 times
  • Hi Christian,


    this can probably be done the exit steps of the J-Flash project.
    The exit steps can be found in Options -> Project settings -> tab "Setup".


    Best regards,
    Niklas
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • Hi Niklas,
    thanks for the suggestion, is already something I was thinking but to write the CFG register it's necessary a read of status register before to write the CFG. It looks like a "special" access for this register.

    Does the J-FLASH take care of this or do we need to do a commands sequence (read status, write CFG, etc..)?
    Is it also possible using some script file?

    thanks in advance
    cristian
  • Hi Christian,

    I was thinking but to write the CFG register it's necessary a read of status register before to write the CFG. It looks like a "special" access for this register.

    I could not find anything like this in the documentation of the flash device. Could you please point me to the respective documentation?

    Does the J-FLASH take care of this or do we need to do a commands sequence (read status, write CFG, etc..)?

    You need to do a command sequence.
    An example can be found in <J-Link software install path>\Samples\JFlashSPI\ProjectFiles\Winbond_ReadModifyWrite_SecurityRegisters.jflash

    Is it also possible using some script file?

    Currently not possible in J-Flash SPI, and currently also not planned for the future either.

    Best regards,
    Niklas
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • Hi Niklas,
    sorry for long time answering.
    The sequence to write Configuration Register is on page 71 par. 9.3.7 of the datasheet (attached extracted page). We just need to write CR1[1]bit and set to "1".
    An example can be found in \Samples\JFlashSPI\ProjectFiles\Winbond_ReadModifyWrite_SecurityRegisters.jflash

    I read the example files, do you refer to the [SPI] or [CPU]section commands?

    regards,
    Cristian
    Images
    • 2017-09-14_1425.png

      252.24 kB, 945×887, viewed 459 times