Flash Programming Write & Erase fails on QSPI_B

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Flash Programming Write & Erase fails on QSPI_B

342 Views
keithw
Contributor I

On our board design, we have two QSPI Flash Chips (1Gb each) that we will be operating in parallel mode on a LS1046A.  We are using the Flash Programmer utility in Code Warrior (version 11.5.12) to program the devices.  When we program QSPI A flash (Starting Address 0x40000000), everything works as expected.  When we attempt to program QSPI B flash (0x48000000), the data is not written to flash.  We also cannot successfully execute erase commands.  If we program the QSPI B chip using an external device (Corelis JTAG), we are able to successfully read in parallel mode.

Upon investigation of the problem, we instrumented the QSPI Clock, Chip Select, and 4 data lines for the two QSPI chips.  When we issue an Erase command on QSPI A, we see a series of commands go out the QSPI A bus.  I think it’s a status register read, another status register read, a write enable, a status register read, and finally a series of sector erase commands.  This works as expected.

When we issue the Erase command on QSPI B, the same set of commands are sent but the status register read and write enable commands are transmitted out to the QSPI A device while the Erase is sent to the QSPI B device. Since the QSPI B device has not received the WRITE enable command, the Erase does not work.  I’ve attached a scope capture that shows this behavior.

QSPI_B Scope CaptureQSPI_B Scope Capture

Here are the scope signals:

D0 – QSPI_A Clock

D1 – QSPI_A Chip Select

D2 – QSPI_A D0

D3 – QSPI_A D1

D4 – QSPI_A D2

D5 – QSPI_A D3

D6 – QSPI_B Clock

D7 – QSPI_B Chip Select

D8 – QSPI_B D0

D9 – QSPI_B D1

D10 – QSPI_B D2

D11 – QSPI_B D3

Any ideas on what may be going on to cause this behavior?

0 Kudos
Reply
7 Replies

155 Views
keithw
Contributor I

@yipingwangHave you heard anything back from the expert team?  Do you need any additional information from me to help figure this out?

0 Kudos
Reply

142 Views
yipingwang
NXP TechSupport
NXP TechSupport

I am still working for the update from the expert team now.

I have contacted them again, will update to you as soon as possible.

0 Kudos
Reply

122 Views
yipingwang
NXP TechSupport
NXP TechSupport

Do refer the section 27.7.7 Parallel mode in LS1046ARM to operate the QSPI flash in parallel mode.
Check with the customer if the pin muxing is correctly set in IFC_GRP_[F/E1/D]_EXT RCW field for the QSPI A and B flash. Please Refer to section 3.4.7 IFC, QSPI, FTM and GPIO2 signal multiplexing in LS1046ARM for the same.

We are further investigating the issue on our end.

0 Kudos
Reply

102 Views
keithw
Contributor I

If we program the chips using external tools, we are able to boot and read from the parallel flash chips which confirm that the pin multiplexing settings in the RCW are correct.  I have verified these settings.  This issue only appears when programming using the CodeWarrior Flash Programming utility. 

0 Kudos
Reply

59 Views
yipingwang
NXP TechSupport
NXP TechSupport

In the following "QSPI Initialization" section in "Target Initialization File", please configure 

QSPI_BFGENCR[PAR_EN] and QuadSPI_IPCR[PAR_EN] as "1".

###################################################################
# QSPI Initialization
###################################################################
def Init_QSPI():
# QSPI_CFG
CCSR_BE_M(0x157015C, 0x20100000)

# SMPR
CCSR_BE_M(0x1550108, 0x00000000)

# QuadSPI_FLSHCR
CCSR_BE_M(0x155000C, 0x00000303)

# Set top address for each device
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
CCSR_BE_M(0x1550000, 0x000f4000)

In the following section in "Adds Flash devices for this board" in "Target Initialization File", please configure "address" as 0x48000000.

# Add QSPI device
fl.add_device({"alias": "qspi", "name": "S25FS512S", "address": 0x40000000, "ws_address": 0x10000000, "ws_size": 0x1FFFF, "geometry": "8x1", "controller": "QSPI"})

0 Kudos
Reply

273 Views
yipingwang
NXP TechSupport
NXP TechSupport

Discussing with the expert team.

0 Kudos
Reply

237 Views
keithw
Contributor I

Any updates?

0 Kudos
Reply