Cannot flash to QSPI NVM on custom LS1012A board (?)

cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot flash to QSPI NVM on custom LS1012A board (?)

900 Views
ajee
Contributor I

Background

I'm currently bringing up a custom LS1012A board that references the FRDM-LS1012A design.

Major differences/similarities of the custom board are:

  • Removal of K20 used for CMSIS DAP
  • Near-identical DDR3L SDRAM (AS4C512M16D3L used in place of MT41K256M16)
  • Same QSPI flash NVM (S25FS512SAGNFI011)
  • Similar reset switch circuit

Problem

CodeWarrior Flash Programmer always fails when attempting to write to QSPI flash memory. It will get stuck on "Erasing..." and fail after a while.

This is done with the same procedure that I've successfully used to flash RCW and U-Boot binaries into FRDM-LS1012A boards (some previously bricked by bad RCWs) with the CodeWarrior TAP. 

FlashProgrammerFailed.PNG

Thing's I've Tried (To No Avail)

  • Enable hard-coded RCW with USE_SAFE_RCW = True
  • Enable hard-coded RCW with CLK_OUT pin
  • Connect DUT_PORST_B signal to SDRAM Reset
  • Adjust the JTAG speed
  • Verified correct voltages to all components

If anyone can shed some light on the problem or suggest something to try or double-check, I'd really appreciate it.

~Alex

0 Kudos
3 Replies

332 Views
ajee
Contributor I

Update

Upon capturing and decoding the QSPI transactions to the Cypress S25FS512S QSPI flash memory device, I've discovered why the Flash Programmer fails.

 

A Write Enable (WREN) instruction is sent to the device, attempting to set the Write Enable Latch (WEL) bit in  Status Register 1 (SR1V[1]). This WEL bit must be set to a 1 to enable write, program, and erase commands.

A subsequent Read Status Register 1 (RDSR1) instruction checks whether the WEL bit is set. However, the data returned is 0x0, indicating that the WEL bit hasn't been set.

The Flash Programmer will then keep repeat that process, trying to set the WEL bit and seeing that it hasn't been set, until timing out.

Note: I've slightly simplified the algorithm used by the Flash Programmer in order to plainly describe the problem.

Question: Is the problem with my component, its initialization, or its configuration? Suggestions on anything in particular to check?

Speaking of configuration, that leads into my next question. The S25FS512S QSPI NOR Flash Memory device has several registers that are non-volatile + one time programmable (OTP). In particular, there are Configuration Registers 1-4 Non-Volatile that have initial delivery states of 0h, 8h, 0h, and 10h respectively. When reading from these registers on the FRDM-LS1012A board, I noticed that they had values of 0h, 8h, 8h, and 10h, with Configuration Register 3 Non-Volatile (CR3NV) having a non-default value.

Question: Were the S25FS512S flash memory components used on FRDM-LS1012A boards pre-programmed?

0 Kudos

332 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello Alex Jee,

I also encountered similar problem on LS1012AFDM, please try the procedure which I provided in https://community.nxp.com/thread/439034?commentID=852508#comment-852508, if your problem remains please feel free to let me know.


Have a great day,
TIC

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

0 Kudos

332 Views
ajee
Contributor I

I had previously found your post and attempted it with no success. I repeated it just now to double-check.

It works on my FRDM boards but not on my custom LS1012A board; the behavior of the latter is consistent with what I described in the first half of my update.

Here are captures from a logic analyzer showing that behavior:

1) RDAR instruction with address of CR3NV.

TEK00013.png

2) WREN instruction to set WEL bit (SR1V[1]) to a 1.

tek00014.png

3) CLSR instruction to reset SR1V[5] and SR1V[6] bits.

tek00015.png

4) RDSR1 instruction to read SR1V.

TEK00016.PNG

5) Repetition of 2 - 4 forever (until hard reset of board)

0 Kudos