Not able to configure registers using WRR command on S25FL256

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

cross mob
jufailkapoor
Level 1
Level 1
5 sign-ins First reply posted First question asked

Hi 

I am using STM32F723 mico controller connected to S25FL256 spansion chip.

I am trying to configure the spansion chip to QPI mode, but not able to change to the volatile memories. It is not throwing any error, but the registers are not getting changed.

Even i am not able to do :

1. sector erase

2. write to the flash memory.

3. Do memory map read

The connection is as below

GPIOB_PIN_2  -------------------- > QSPI_SCK

GPIOB_PIN_5 ----------------------> QSPI_nCS

GPIOF_PIN_8-----------------------> QSPI_SIO0

GPIOF_PIN_9------------------------>QSPI_SIO1

GPIOF_PIN_7------------------------>QSPI_SIO2  (directly connected, no pullup or not grounded)

GPIOF_PIN_6------------------------>QSPI_SIO3  (directly connected, no pullup or not grounded)

 

When i read the status registers and configuration registers, below is what i read.

Status register 1 (volatile)  -  0x10

Config Register 1                    - 0x21

Config Register 2                    - 0x00

Config Register 3                    - 0x78

My requirement is to configure for QUAD SPI mode, un-lock all the memories.

I tried sending the following commands in sequence, but i am not able to configure.

WREN (Tried WENV also) -------> WRR (With the respective register changes)

 

Why i am not able to configure? Any clue?

               

 

0 Likes
1 Solution
Apurva_S
Moderator
Moderator
Moderator
100 likes received 500 replies posted 250 solutions authored

Hi @jufailkapoor 

When SRP1_D is set to 1, the registers are permanently locked. This bit is OTP (One Time Programmable) so it cannot be reset to 0. Unfortunately, there is no way to modify the status and configuration registers once the SRP1_D bit is set.

Regards. 

View solution in original post

0 Likes
5 Replies
Apurva_S
Moderator
Moderator
Moderator
100 likes received 500 replies posted 250 solutions authored

Hi @jufailkapoor 

Could you please provide the full MPN of the device that you are using? As per my understanding, you are using the S25FL256device. Please see page 49 of the datasheet. You have mentioned that SR1 value is 0x10, which means bit 7 SRP0 is set. When the SRP0 bit is set and WP# line is driven LOW, all status and configuration registers are locked and cannot be modified. If WP# is driven HIGH then the register values can be modified.

Hope this answers your query.

Regards. 

0 Likes

Thanks for your response. But the Configuration Register 1 reading says 0x21 and the data sheet says status and configuration registers are locked. What does that mean, will i not be able to change the configuration?

0 Likes

Hi @Apurva_S 

Sorry there was an error in the values i mentioned. In my case

SRP1 and SRP1_D is set, but SRP0 is not set. So is there a way to get back the registers to default factory settings?

0 Likes
jufailkapoor
Level 1
Level 1
5 sign-ins First reply posted First question asked

I use S25FL256L Nor Flash interfaced to STM32F7 microcontroller.

When i read the status registers and configuration registers of S25FL256L,  below is what i read.

Status register 1 (volatile)  -  0x10

Config Register 1 (volatile) = 0x21  (SRP1 is set)

Config Register 1 (Non Volatile) = 0x21 (SRP1_D is set)

 Config Register 2                    - 0x00

Config Register 3                    - 0x78

 

I am able to do erase/write and read in single line mode. I wanted to configure it to Quad mode, for which i am not able to write to configuration registers.

So if SRP1 and SRP1_D is set, will i not be able to write to the config registers to configure for quad mode?

Is there a way i can configure it to quad mode?

 

 

0 Likes
Apurva_S
Moderator
Moderator
Moderator
100 likes received 500 replies posted 250 solutions authored

Hi @jufailkapoor 

When SRP1_D is set to 1, the registers are permanently locked. This bit is OTP (One Time Programmable) so it cannot be reset to 0. Unfortunately, there is no way to modify the status and configuration registers once the SRP1_D bit is set.

Regards. 

0 Likes