S25HL02GT Programming Error

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

cross mob
Sugi
Level 1
Level 1
First reply posted First question asked Welcome!

I use S25HL02GT with a single SPI. I write to S25HL02GT by the following procedure, but a program error occurs and I cannot write. After that, an H / W reset is required. The clock is about 33MHz.

<Question>

1. Why does the following procedure cause a program error (PRGERR is 1)?

2. Do I need to make register settings or pin pull-up settings in order to use the S25HL02GT with the 1S-1S-1S? Currently used by default.

<Procedure>

1.Write Enable Command WRENB_0_0 (0x06)

2.Program Flash Array Command PRPGE_4_1 (0x12)

3.Address 4byte (0x00000000)

4.Data

5.Read Status Register1 Command (0x05)

After that, repeat step 5. The response in 5. is as follows.

-First two times: 0x03 (WRPGEN (STR1V [1]) and RDYBSY (STR1V [0]) are 1)

-After the third time: 0x41 (PRGERR (STR1V [6]) and RDYBSY (STR1V [0]) are 1)

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

Hi @Sugi 

The RDAY2_4_0 command sequence is as follows - 8 bit command, followed by the address, followed by eight cycles of mode bits,  followed by an optional latency period. Are you sending the mode bits? If you have not considered sending the mode bytes in your application, then seems like the first 0x00 that you have received is dummy byte where the flash is expecting the host to send mode bits. You can refer to the device datasheet to understand more about mode bits usage.

Regards.

View solution in original post

0 Likes
4 Replies
BushraH_91
Moderator
Moderator
Moderator
750 replies posted 50 likes received 250 solutions authored

Hello,

Thank you for contacting Cypress Technical Support, an Infineon Technologies Company. Please allow me time to do some research and get back to you as soon as we find the resolutions.

Happy Holidays!

Regards,

Bushra

0 Likes

Hello,

The command sequence looks no problem.  

Please  reboot the board, then use RDARG_C_0 (0x65) + SR1 4-byte address
2 read latency
Then let us know the SR1 value
Please note, do not send programming command sequence before above suggested read SR1 test after board boot up
 
Thank you
Regards,
Bushra
0 Likes
Sugi
Level 1
Level 1
First reply posted First question asked Welcome!

Hello,

Thank you for your reply.

 

I'm sorry, it seemed to be able not to erase the data written to the flash.

That seems to be the cause of the programming error.

I was able to write after erasing the data on the flash.

 

However, there is another problem.

For example, if I write 0xAA to the address 0x00000000 ~ 0x00000100 of the flash and then read the address written to the flash with the RDAY2_4_0 command, the data will be output from the flash in the following order.

Why is the 1st byte data 0x00?

Since the 101th byte is 0xAA, it looks like the 1st byte is not reading the flash data and is starting to read the data from the 2nd byte.

 

1st byte 0x00

2nd byte 0xAA

3rd byte 0xAA ...

100th byte 0xAA

101th byte 0xAA

102th byte 0x00 

103th byte 0x00 ...

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

Hi @Sugi 

The RDAY2_4_0 command sequence is as follows - 8 bit command, followed by the address, followed by eight cycles of mode bits,  followed by an optional latency period. Are you sending the mode bits? If you have not considered sending the mode bytes in your application, then seems like the first 0x00 that you have received is dummy byte where the flash is expecting the host to send mode bits. You can refer to the device datasheet to understand more about mode bits usage.

Regards.

0 Likes