Add command in Flash Programmer

cancel
Showing results for 
Search instead for 
Did you mean: 

Add command in Flash Programmer

454 Views
minalnemade
Contributor II

We have designed a custom board using LS1012A process and using serial NAND flash W25N01GWxxIT. At power up this serial NAND flash works in continuous read mode(status register bit, BUF = 0). In this mode when processor send 0x03 command to read flash it always gives data from 0th column address ignoring the column address send by processor.  Due to which when processor read RCW from 0th location of flash it gives only preamble and address location of DFCG RCWSR for every read of processor. So when processor read 64 bytes of RCW in batches of 8 bytes, every time it read 4 bytes of preamble and 4 bytes of DFCG RCWSR address. So process gives invalid RCW error. To avoid this we want to change flash mode to buffer read mode (status register bit, BUF = 1). For this it is required to set BUF bit in the flash status register.

So my queries are

1. Can we add Flash status register write command while programing the flash. So that Flash gets configured in buffer read mode

2. Can we add this command in flash programmer of CodeWarrior 18.03 tool.

Thanks & Regards

Minal

0 Kudos
2 Replies

275 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello Minal Nemade,

Please refer to the following QSPI related registers definition in CodeWarrior initialization file for LS1012ARDB.

You could modify CodeWarrior initialization file from Run->Debug Configurations->GDB hardware debugging->Debugger->Configure Target Connection, duplicate LS1012A_RDB and double click LS1012A_RDB(1) to edit it.

    if QSPI_NAND:

        CCSR_BE_M(0x157015C, 0x50100000)

    else:

        CCSR_BE_M(0x157015C, 0x40100000)

 

    # QuadSPI_MCR - disable device clocks

    CCSR_BE_M(0x1550000, 0x000F4004)

 

    # SMPR

    CCSR_BE_M(0x1550108, 0x00000000)

 

    # QuadSPI_FLSHCR

    CCSR_BE_M(0x155000C, 0x00000303)

 

    # Set top address for each device

    if QSPI_NAND:

        CCSR_BE_M(0x1550180, 0x42000000)

        CCSR_BE_M(0x1550184, 0x42000000)

        CCSR_BE_M(0x1550188, 0x44000000)

        CCSR_BE_M(0x155018C, 0x44000000)

    else:

        CCSR_BE_M(0x1550180, 0x44000000)

        CCSR_BE_M(0x1550184, 0x48000000)

        CCSR_BE_M(0x1550188, 0x4C000000)

        CCSR_BE_M(0x155018C, 0x50000000)

 

    # BUF0CR

    CCSR_BE_M(0x1550010, 0x00000000)

    # BUF3CR

    CCSR_BE_M(0x155001C, 0x80000000)

    # BFGENCR

    CCSR_BE_M(0x1550020, 0x00000000)

 

    # QuadSPI_MCR - enable device clocks

    CCSR_BE_M(0x1550000, 0x000f0004)


Have a great day,
TIC

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

275 Views
minalnemade
Contributor II

Hi Yiping,

The solution suggested by you is to write processor registers but

we want to write configuration register in flash device either

before or after downloading RCW. Please suggest.

Thanks & Regards

Minal

0 Kudos