Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
MuKh_4408861
Level 3
Level 3
10 replies posted 10 sign-ins 5 replies posted

Hi all,

I've downloaded standard code from Cypress page for NOR-Flash programming.

https://www.cypress.com/documentation/code-examples/ce220823-psoc-6-mcu-smif-memory-write-and-read-o...
Reconfigured successfully to my Processor which is CY8C6347FMI-BLD53T.
Reconfigured with my modified cymem file for S25FL064L NOR-Flash (see attached and also image below).

pastedImage_11.png

Getting all 0xFF on reading.

FAIL: Read data does not match with written data. Read/Write operation failed.

Error Code: 0xFFFFFF01

Error Code:
0xFFFFFF01

Please advise what is wrong.
With my other code I was able to read ID and Erase and Read chip in quad mode, but with same outcome. After programming all reading FFs.
Same code running on EV board was able to correctly program S25FL512S memory.

0 Likes
1 Solution

Hi,

Thank you so much for the detailed explanation of the problem. Please see my comments and question below -

  • I have gone through the S25FL064L.cymem file provided by you. I noticed that you are using 6Bh command for read. I would like to point out that 6Bh command is Quad Output Read (QOR) which means that only the output of this command is Quad. That is, the instruction, address and dummy cycles provided in this command are single width and only the output received from the flash is quad. See the timing diagram from datasheet below. However, in the configuration file provided by you the width for address, mode and dummy cycles have also been set to Quad. Could you please set it up correctly and try again?

pastedImage_2.png

  • Could you please explain why you have set the dummy cycles for 6Bh command to 32? You can find the required number of dummy cycles depending upon the operating frequency for different read commands mentioned in Table 17 on page 36 of the datasheet. Let me know if you have any confusion in calculating the correct number of dummy cycles for your application.
  • We agree with your speculation that the issue seems to be with the SW, not HW, since you are able to read the correct device ID. However, it is important to see waveforms while debugging. Seeing the terminal output might not be a dependable way because there might be chances of inconsistency (due to human error) between what signal is being sent to or received from the flash with respect to what is being printed on the terminal. We look at waveforms to make sure that the flash is receiving the correct signals, that is - width of the instruction/dummy cycle/address should be correct, number of dummy cycles provided should be correct, number of address bytes should be correct according to the command being used, etc.
  • You have mentioned in your latest reply that 'reading in normal mode' with '0x02' command is OK. I would like to point out that 02h command is actually Page Program command. Single SPI read command is 03h. Can you please confirm whether 02h is a typing mistake? If yes, can you please reconfirm once that Quad mode has been enabled for S25FL064L device? The QUAD_NV (CR1NV[1]) bit should be set to 1 to be able to use Quad commands.

Please Let me know if you have any questions.

Regards,

Apurva

View solution in original post

0 Likes
6 Replies