Cannot programm successfully when flash is stored with wrong code

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

cross mob
GrWa_2302706
Level 4
Level 4
50 questions asked 25 replies posted 10 replies posted

Hi

There is a strange issue while using S25FL127S.

CPU is used to upgrade the data in flash, which is boot code.

If flash has been programmed with the right code already, then CPU can upgrade the data in the flash successfully.

However, if flash has been programmed with the wrong code already, then CPU cannot upgrade the flash successfully.

The failure shows CPU can erase flash successfully, then CPU programs and read it but find partial data is wrong.

Could you help find out the cause ? Thanks.

BR

Grace

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

Hi Grace,

Thank you for contacting Cypress Semiconductor. I would like to ask you a few questions -

  1. Which microcontroller are you using?
  2. Are you using the device in Quad mode or Single SPI mode?
  3. Could you please tell me the status register value after power up, before erase, after erase, before program and after program operations?
  4. Did you read the flash data back to confirm that the erase operation was successful?
  5. Could you please tell me what is the condition under which the CPU upgrades the flash? Is there any condition being checked?
  6. How are you confirming that the flash has not been programmed properly? Are the error bits in status register getting set or are you reading the data back from the flash to confirm programming was not successful?

Best Regards,

Apurva

0 Likes

Hi Apurva

I'll answer 4 and 6 first.

4. Yes. Read the flash back with all 0xFF after erase operation.

6. Read the data back and compare the flash data with that programmed.

About Q5, what kind of condition do you mean ?

Thanks.

BR

Grace

0 Likes

Hi Apurva

1. CPU is x86.

2. Using in Single SPI mode.

BR

Grace

0 Likes

Hi Grace,

Thank you for your reply.

About Q5, what kind of condition do you mean ?

>> In the initial problem description you have mentioned that "if flash has been programmed with the wrong code already, then CPU cannot upgrade the flash successfully". My question is, is the CPU checking the previously programmed data in the flash before upgrading it with new data? Is there any condition like that in your overall application?

I would like to repeat my question 3 from previous response. Could you please tell me the status register value after power up, before erase, after erase, before program and after program (most importantly) operations?

Best Regards,

Apurva

0 Likes