Cannot write to Status Register 1 Volatile

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

cross mob
Anonymous
Not applicable

Hello,

We have a board with STM32F746VGT7 CPU connected thru QUADSPI interface to a flash memory chip S25FL128L. The firmware uses STM32F7_HAL_Driver library.

Commands for resetting the memory, dummy cycle configuration, reading registers and writing to the memory seem to be executing fine, but reading back the memory with command 0xEB (Quad I/O Read) always returns 0x88.

The reference manual says that bits CR1V[1] or CR2V[3] must be set to "1" to enable QUAD/QPI reading, but I cannot modify those bits; those registers are protected. To unprotect them, bit SRP0 in Status register SR1V needs to be set "0", but a cannot modify that register, either.

Can someone give me a hint how to unprotect registries and set the mode to QUAD/QPI

Thanks!

0 Likes
1 Solution
BacemD_61
Employee
Employee
50 replies posted 50 sign-ins 25 replies posted

Hello,

To use the command 0xEB tp ead the memory array, you need to have the right number of dummy cycles configured which correspond to the SPI frequency you're using. You can refer to table 19 (page 38) from the datasheet for the details about the Latency Codes.

These are defined in bits CR3NV[0..4] and CR3V[0..4].

The other thing you need to consider is the 3-byte addressing or 4-byte addressing being used:

- If CR2V[0]=0 then 3-byte address isused

- If CR2V[0]=1, then 4-byte address (A31-A0) is used

CR2V[3] and CR2NV[3] does not have to be set otherwise you will enable the QPI mode (4-4-4) and the flash will have to be operated in that mode. You will then need to send command Exit QPI to exit that mode.

Can you send logic analyzer traces of the failing reads?

What SPI frequency are you running at?

I'm also suspecting that you had a power loss during register programming which may have led to registers corruption. In that case, the unit may be bricked.

How many units did you test in total and how many were failing?

Best regards,

Bacem

--------

Customer Application Engineering

Flash Business Unit

Cypress Semiconductor Corp.

View solution in original post

0 Likes
1 Reply
BacemD_61
Employee
Employee
50 replies posted 50 sign-ins 25 replies posted

Hello,

To use the command 0xEB tp ead the memory array, you need to have the right number of dummy cycles configured which correspond to the SPI frequency you're using. You can refer to table 19 (page 38) from the datasheet for the details about the Latency Codes.

These are defined in bits CR3NV[0..4] and CR3V[0..4].

The other thing you need to consider is the 3-byte addressing or 4-byte addressing being used:

- If CR2V[0]=0 then 3-byte address isused

- If CR2V[0]=1, then 4-byte address (A31-A0) is used

CR2V[3] and CR2NV[3] does not have to be set otherwise you will enable the QPI mode (4-4-4) and the flash will have to be operated in that mode. You will then need to send command Exit QPI to exit that mode.

Can you send logic analyzer traces of the failing reads?

What SPI frequency are you running at?

I'm also suspecting that you had a power loss during register programming which may have led to registers corruption. In that case, the unit may be bricked.

How many units did you test in total and how many were failing?

Best regards,

Bacem

--------

Customer Application Engineering

Flash Business Unit

Cypress Semiconductor Corp.

0 Likes