Replace W25Q64Fv memory with IS25LP128 in SK-S7G2



I`m working with SSP 1.3.2, e2studio 6.1.0 and SK-S7G2. 

The problem is that I need to replace the current QSPI memory with another model with more capacity.

I have tried to modify the bsp_qspi.c and bsp_qspi.h files, but when I build the project, these files are overwritten.

I have read in other threads of the forum that the solution is to configure the BSP as Custom Board. I have tried to do it, but then, when building the project many errors are generated since some constants are undefined. I have also read that it can be done using the function R_BSP_WarmStart, but I do not understand how to do it.

I think that replacing a memory or any other device is something that is usual, but I have not found detailed information on how to do it keeping the bsp of SK-S7G2.

Can anybody help me?


Best regards.


  • Hi Fernando,

    Have you remembered to mark the files as read-only after changes? It should prevent these files from being overwritten.

  • In reply to adboc:

    Hi adboc.

    I have done what you tell me and it has worked. Sometimes the simplest solutions are the ones that work. Thank you very much for your help.

    Now I have another question.
    The QSPI memory of the SK-S7G2 is 64 Mbit and the new one is 128 Mbit. In the function "R_QSPI_Open", when reading the memory register, access the address 0x64000000 and read manufactured_id, memory_type, etc, correctly. Since the memory is 128 Mb, the address should not be 0x68000000 ?.

    #define BSP_PRV_QSPI_MEMORY_TYPE 0x60

    In the S7G2.ld script, I changed:
    __qspi_region_max_size__ = 0x8000000

    and QSPI_FLASH (rx): ORIGIN = 0x60000000, LENGTH = 0x8000000 / * 128M, Change in QSPI section below also * /

    I need to make some other change?

  • In reply to feraro:

    Hi Fernando,

    I'm looking at SSP 1.3.2 SK-S7G2 BSP and the QSPI driver and cannot see reading from 0x64000000. To read device characteristics, it issues QSPI_COMMAND_READ_ID (0x9F) command in bsp_qspi.c - your device may use a different one, please see chip's datasheet.

    The QSPI driver uses the following BSP functions, these ones should be modified to work properly with your chip:

    • bsp_qspi_config_get
    • bsp_qspi_xip_exit
    • bsp_qspi_xip_enter
    • bsp_qspi_erase_sizes_get
    • bsp_qspi_erase_command_get
    • bsp_qspi_status_get

    The changes you've applied to linker script seems to be sufficient.


  • In reply to adboc:

    Hi adboc.

    Now I am communicating correctly with the flash memory. I read, erase and write correctly.

    I think that the access to address 0x64000000 was an incorrect interpretation with the debugger.

    Thank you very much for your help.

    Best regards
  • In reply to feraro:

    Hi Fernando,
    Can you share your IS25LP128 files please ? ( bsp_qspi.c and bsp_qspi.h files)
    Thanks a lot