S70FS01GS Read Any Register (solved)

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

cross mob
Anonymous
Not applicable

Hi,

I have a problem with the RDAR command. First of all writing, reading, and erasing pages works fine.

When I use the RDAR command to read a register, every bit I read is 0. I tested with the different configuration registers and at least the bits 3 and 7 in configuration register 2 should be 1.

My program sequence:

  • Configure the SPI connection with 1MHz clock frequency
  • Sending command B7h (Enter 4Byte-address mode)
  • Sending command 65h (Read any register)
  • Sending 4Byte address of the register in 4 8bit data blocks (00000003h for config register 2)
  • Sending empty dummy cycles to activate the clock and receiving data

Because I use a frequency of 1MHz the data should be available right after the address.

Have I made a mistake in the sequence, or is the data (all zeros) correct?ReadRegister.png

Here is an image of the SPI connection between the memory (slave) and the MCU (master) (r=CS, y=clock, b=MOSI, g=MISO)

Nachricht geändert durch Philip Scharf

0 Likes
1 Solution
Anonymous
Not applicable

I have found the problem. I was using the wrong data sheet the whole time. The memory I am using is the S70FL01GS and not the S70FS01GS. I have mixed something up here.

Thank you for your time, it helped me understanding the registers more.

View solution in original post

0 Likes
7 Replies
BacemD_61
Employee
Employee
50 replies posted 50 sign-ins 25 replies posted

Hello,

The default value for the latency codes is 8 (CR2NV[0..3]). So unless you already changed these latency codes, you can read the register values after waiting 8 dummy cycles after you provide the address. The sequence should be: command, 4-bytes address, 8 dummy cycles then read the register.

I see in the waveform you sent that you're getting 0x0. Did you change the CR2NV value?

Did you have a power loss during programming the registers?

Your device maybe set in QPI mode. Could you try reading the device ID in QPI mode?

Best regards,

Bacem

---

Cypress semiconductor Corp.

Customer Application Engineering

Anonymous
Not applicable

Thank you for your answer.

I have tried a few things and what I can say by now is:

  • Reading the ID in single mode works
  • Reading data with 3Byte address (0x03) and 4Byte (0x13) works
  • Page Programming works
  • Erasing Data works

I haven´t changed any of the bits in the CR2NV register (or any other register), I should only change the 4Byte Address bit in the CR2V register by using the 4Byte mode command.

Testing the QPI mode by reading the ID in QPI mode would need some time, because I have to learn how to use it with my controller. Would the legacy SPI commands work in QPI mode?

And I don´t know if I really activate the 4Byte mode, because the 0x03 command always gets the data after the 3rd Address Byte, even after using the 4Byte address command 0xB7.

Also after using more dummy cycles, I always get 0x0 when reading any of the registers.

Edit: It seens like, there is a problem with the addressing of the registers. I can for example read the password register with the PASSRD command (0xE7) and get the correct data (0xFF), but when I want to read the same register with the RDAR command (0x65) I don´t get data back (0x00). I tested RDAR with 3Byte and 4Byte address.

0 Likes

Hello,

It looks like you're having problems to activate the 4-Byte addressing scheme.

Actually, the read command 03h should use 4-bytes of address when the 4-Byte addressing scheme was correctly activated:

pastedImage_2.png

The RDAR command requires the 4-bytes addressing scheme to be activated otherwise it won't work.

To enter the 4-byte address mode, you should send the command 4BAM: B7h.

pastedImage_1.png

It looks like for some reason the 4BAM command is not being accepted by the chip. Please double check!

Best regards,

Bacem

---

Cypress semiconductor Corp.

Customer Application Engineering

Anonymous
Not applicable

It is clear to me now, that the problem is the 4byte address mode, but I don´t see, why the chip doesn´t accept the instruction.

I have checked the instructions and it send the correct bits with the correct edge of the clock to the chip.

What I found out is, when I don´t rise the chip select pin after the 0xB7 command, I can´t read any data from the chip.

For testing purpose, I have programmed 0x1A onto address 0x00. In the attached diagram you can see my sequence, where it should get the data after the 4th address byte, but it gets the data after the 3rd address byte.

Are there some situations where this can happen?

3Byte.PNG

(r=CS, y=clock, b=MOSI, g=MISO)

0 Likes

Hello,

CS# MUST go high after sending the 4BAM command, otherwise the command will not be accepted and the chip will not go into 4-byte addressing mode:

pastedImage_0.png

Is there a way you can read CR2NV to check whether the the AL bit is 1 or 0.

I think yo uhave a problem with the latency codes defined in CR3V and you need to know these in order to ruse the RDAR command.

As a workaround, you can use the WRAR command to program the CR3V to a known value (e.g: 0x78), which means that you need 8 dummy cycles after the command and address of the RDAR.

Please give it a try!

Best regards,

Bacem

Anonymous
Not applicable

I have found the problem. I was using the wrong data sheet the whole time. The memory I am using is the S70FL01GS and not the S70FS01GS. I have mixed something up here.

Thank you for your time, it helped me understanding the registers more.

0 Likes

Glad to hear that the problem is now fixed!

Best regards,

Bacem

0 Likes