How to resize flash memory qspi

Hi.

 

I have started a project for SK-S7G2 that incorporates a 64M Bit external flash memory. I need to replace it with a 128M Bit. When I access the registers, I have seen that QSPI base address is 0x64000000. I think the address should be 0x68000000, but I do not know where I should enter this change.

Could anyone help me.

Thank you

 

Regards

Javier

  • The QSPI periheral in Synergy has a 64MB window to access the external QSPI device (QSPI ROM window):-

    your code will have to manually control the QSPI.EXT bits in the SFMCNT1 register to access different areas of your 128MB QSPI device.

  • In reply to Jeremy:

    Hi Jeremi.

    Initially, to test, I just need to access the first 64Mb of memory. I understand that the QSPI base address to write/read the register would still be 0x68000000. Where and how should I define this address?

    Thank you.

    Regards.
    Javier
  • In reply to Javier:

    The base address of the QSPI peripheral registers are at 0x64000000, this is fixed in the hardware and cannot be changed.

    the registers for the QSPI peripheral are already defined in a header file, to access the QSPI registers :-

    R_QSPI->SFMCNT1_b.QSPI_EXT = 0;
  • In reply to Jeremy:

    Hi Jeremy.

    Thanks for the clarification. I thought that since the memory was 128 Mb, the address range was from 0x60000000 to 0x67FFFFFF, and that the memory address 0x64000000 was a normal memory location.

    Regards
    Javier

  • In reply to Javier:

    Hi

    I already get to read, erase and write in the new flash memory qspi 128 Mb. Now the problem is that, when I load a function in this memory doing:

    UINT show_window (GX_WINDOW *, GX_WIDGET *, bool) BSP_PLACE_IN_SECTION (". Qspi_flash_code");

    When the function is called, the thread is suspended and gives the error:

    Suspended: Signal: SIGILL: Illegal instruction.

     

     

    Working with the W25Q64FV flash, it worked correctly.


    Can someone help me ?.
    Thank you

    Regards.
    Javier

  • In reply to Javier:

    Hi Javier-
    Take a look at this Knowledge base post to see if you missed anything.
    en-support.renesas.com/.../18054800

    Additionally, is it possible the code being referenced isn't in the block currently available?

    Warren
  • In reply to WarrenM:

    Hi Warren

    I think the problem may be in the control of the external flash that I am using, which is an IS25LP128. Since when I put the flash W25Q64FV, which is the one that carries the SK-S7G2 board, which is what I am using, works perfectly.

    I do not know where the problem may be. I have customized the bsp_qspi.c and bsp_qspi.h files for this memory. I have
    verified that from the address 0x60000000 is the recorded code.

    Thanks,
    Regards
    Javier
  • In reply to Javier:

    Hi Javier-
    I would suggest you look over the documentation (data sheet) on both devices to see if there are any differences in how they manage flash operations. Often a device may have slightly different register mappings, enable or timing differences that need to be handled slightly differently.

    Warren
  • In reply to WarrenM:

    Hi Warren.

    How is it reported to debug the type of flash memory qspi I am using?. I have verified that when I load the application with the debug, in the flash memory qspi, address 0x60000000, nothing is recorded, it is all to 00.

    Thanks
    Regards
    Javier
  • In reply to Javier:

    Hi Javier-
    Here is another KB article that might help. Look over the section on Writing to QSPI.
    en-support.renesas.com/.../18058056

    Also, there is a simple C program attached at the end of the KB article that might help.

    Warren