i can not erase the S26KS512

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

cross mob
jasu_4600241
Level 1
Level 1

I can not erase the s26Ks512 , after the erase operation, i got the status register code 0xA2. that mean the chip is locked,but  the ppb and dyb code both were 0xffff.

0 Likes
1 Solution
SudheeshK
Moderator
Moderator
Moderator
250 sign-ins First question asked 750 replies posted

Hi Jack Su,

I discussed this issue internally with our product experts. Please find our comments below.

As per the datasheet the pin A3 is DNU (Do Not Use), it is connected internally and we recommend to leave DNU pins unconnected. But, in your schematic, the pin A3 is pulled up and connected to M_FLASH_CS2 signal. What is the voltage on the pin A3 during an erase operation? Can you make this pin floating and test again?

Thanks and Regards,

Sudheesh

View solution in original post

0 Likes
11 Replies
SudheeshK
Moderator
Moderator
Moderator
250 sign-ins First question asked 750 replies posted

Hi Jack Su,

Are you facing this issue (erase failure) with all of the sectors? Or, only few sectors are showing this error? Please clarify.

Is it possible for you to provide logic analyzer traces for sector erase, ppb read and dyb read operations?

Thanks and Regards,

Sudheesh

0 Likes

Hi Sudheeshk,

     thanks for reply,

the s26ks512 is map to the memory address 0x90000000 to 0x94000000; and i  try to erase all the chip ,but failed with read the status register code bit 1 set to 1, which show the  reasons for failure is sector's locked, this  also happend when program the 0x90000000 and 0x93840000.   the s26ks512  is new from factory.  driver code come from offical version Spansion_pNOR_LLD_15.3.1.exe.zip ,

here were the code

FLASHDATA* testBase = (FLASHDATA*)0x90000000;
//PPB read out as 0xffff

    lld_PpbEntryCmd(testBase);

    u32Count =lld_PpbStatusReadCmd(testBase, 0);

    lld_PpbAllEraseCmd(testBase);//erase ppb

   

     u32Count =lld_PpbStatusReadCmd(testBase, 0);

     lld_PpbExitCmd(testBase);

    

      //DYB read out as 0xffff

    lld_DybEntryCmd(testBase);

    lld_DybClrCmd(testBase, 0);

    u32Count = lld_DybReadCmd(testBase, 0);

    lld_DybExitCmd(testBase);   

    //NVCR read

    u32Count = lld_ReadNonVolatileConfigRegCmd(testBase);  

     //VCR read

    u32Count = lld_ReadVolatileConfigRegCmd(testBase);

   

      lld_ChipEraseCmd(testBase);

      // FLASHDATA wrdata=0x000;

      // lld_ProgramCmd(testBase,0,&wrdata);

     lld_StatusRegReadCmd(testBase);

//status register read out as 0x00A2

    u32Count = M16(testBase);

here were the logic analyzer traces  of read and write.pastedImage_0.png

pastedImage_1.png

0 Likes

Hi Hi Jack Su,

Thank you for the details. You have to poll status register after every program and erase operations before starting new operation. You have poll status register after ppb erase command and chip erase command. Please make the below modifications to you code and test again.

1. Replace the API "lld_PpbAllEraseCmd" with "lld_PpbAllEraseOp".

2. Replace the API "lld_ChipEraseCmd" with "lld_ChipEraseOp".

Thanks and Regards,

Sudheesh

0 Likes

Dear Sudheeshk,

     I try replace the API as your reply, but still got the error code 0xA2 . i try to locked the PPB then unlocked, the locked is failed,even the PPBlockbit readback as 0xffff, the DYB and PPBLockbit can be program,erased and read back correctly, can you give some suggestion, thanks a lot!

0 Likes

Hi Jack Su,

As per my understanding, you are not able to erase any of the sectors in our device S26KS512. Both, sector erase and chip erase operations results in error (status register = 0xA2) even though the PPB bits are not programmed. Please correct me, if I am wrong.

To get a better understanding about this issue, could you please provide the below detail?

  1. Are you able to read device ID from our device S26KS512?
  2. Are you able to program any of the sectors in the device S26KS512?
  3. Can you read status register value before the erase/program operation and make sure that none of the error bits are set?
  4. Can you share the schematic diagram of your application? We can review it and let you know ,if there are any changes needed.
  5. Can you share your source code with us? We can check if any modifications needed? If not, please share the "FlashWrite()" and "FlashRead()" function definitions.

Thanks and Regards,

Sudheesh

0 Likes

Hi Sudheeshk,

     thanks for your warm-hearted reply,

   1. I can read the content of deviceID and the SSR.  and they were same as the DataSheet.

   2. I failed to program two Sectors, first sector at 0x90000000,and the secotr at 0x92000000. both can be checked by lld_BlankCheckCmd as blank sector and  PPB and DYB of them were 0xFFFF.

   3.  the status register code were 0x80, before program and erase, and after the operation, turn to 0xA2,or 0x92.

   4. give me your email,and i'll send you complete schematic diagram.

pastedImage_3.png

0 Likes

Hi SudheehK,

      Regarding the issue,the latest progress on my side as below, 

    I read out all the sector's SA protection status register, all of them were 0xfff6.

the datasheet describe this register ,as below

Data out during a SA Protection Status Read indicates whether the indicated sector is protected in bits 0-2.

Bit 0 – Indicates whether the indicated sector is protected (0 = protected, 1 = unprotected).
Bit 1 – Protected using the sector’s DYB bit (0 = protected, 1 = unprotected).
Bit 2 – Protected using the sector’s PPB bit (0 = protected, 1 = unprotected).
looks like the sector is really be locked, i don't know how it was locked, do you have some suggestions, thanks

0 Likes

Hi Jack Su,

I have sent a separate email from my official email ID yesterday.

Could you please reply to my email with your source code?

Thanks and Regards,

Sudheesh

0 Likes
SudheeshK
Moderator
Moderator
Moderator
250 sign-ins First question asked 750 replies posted

Hi Jack Su,

I discussed this issue internally with our product experts. Please find our comments below.

As per the datasheet the pin A3 is DNU (Do Not Use), it is connected internally and we recommend to leave DNU pins unconnected. But, in your schematic, the pin A3 is pulled up and connected to M_FLASH_CS2 signal. What is the voltage on the pin A3 during an erase operation? Can you make this pin floating and test again?

Thanks and Regards,

Sudheesh

0 Likes

Hi SudheeshK,

The situation is indeed as you said, the problem has been solved, thank

you very much for your timely and effective support!

On Wed, Dec 18, 2019, 6:02 PM SudheeshK_26 <community-manager@cypress.com>

0 Likes

Hi Sudheeshk,

     here were another status. i can't  set the PpbLockBit to zero. the code as below:

    u32Count = lld_PpbLockBitReadOp(pBase);            //read out as 0xffff.  the orginal value

     FLASHDATA* pBase = (FLASHDATA*)0x90000000;

    u32Count =lld_PpbLockBitSetOp(pBase);            //i thought this operation will make the PPB lock bit  to 0;

     delay(2);

    u32Count = lld_PpbLockBitReadOp(pBase);        //read out as 0xfffe  only the last bit is set to zero.

0 Likes