- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I read the drive of cypress, did what it told but the erase not work well, there is a big problem on this nor flash.
CS_OFF;
Delay();
masterTxData[1] = 0x00;
masterTxData[2] = 0x00;
masterTxData[3] = 0x00;
Escreve_NOR(0x90,4);
Le_NOR(2);
Delay();
CS_ON;
Delay();
PRINTF("*** Fabricante/Device ID ***\n\n");
for(i = 0;i < 2;i++)
{
PRINTF(" Dado %01i = %02X \n",i+1,masterRxData);
}
PRINTF("\n");
CS_OFF;
Delay();
Escreve_NOR(0x06,1); //Write Enable
Delay();
CS_ON;
Delay();
CS_OFF;
Delay();
masterTxData[1] = 0x00;
masterTxData[2] = 0x00;
masterTxData[3] = 0x00;
masterTxData[4] = 0x00;
Escreve_NOR(0x20,5); //Erase Sector
Delay();
CS_ON;
CS_OFF;
Delay();
Escreve_NOR(0x04,1); //Write Disable
Delay();
CS_ON;
Delay();
CS_OFF;
Delay();
Escreve_NOR(0x06,1); //Write Enable
Delay();
CS_ON;
Delay();
CS_OFF;
Delay();
masterTxData[1] = 0x00;
masterTxData[2] = 0x00;
masterTxData[3] = 0x00;
masterTxData[4] = 0x43;
masterTxData[5] = 0xFD;
masterTxData[6] = 0x4F;
Escreve_NOR(0x02,7); //Writing 3 Datas
Delay();
CS_ON;
Delay();
PRINTF("*** Dados Gravados no endereco 0x000000 ***\n\n");
for(i = 0;i < 3;i++)
{
PRINTF(" Dado gravado %01i = %02X \n",i+1,masterTxData[i+4]);
}
PRINTF("\n");
CS_OFF;
Delay();
Escreve_NOR(0x04,1); //Write Disable
Delay();
CS_ON;
Delay();
delay_ms(1000);
CS_OFF;
Delay();
masterTxData[1] = 0x00;
masterTxData[2] = 0x00;
masterTxData[3] = 0x00;
Escreve_NOR(0x03,4); //Reading the 3 datas
Le_NOR(3);
Delay();
CS_ON;
Delay();
PRINTF("*** Dados Lidos no endereco 0x000000 ***\n\n");
for(i = 0;i < 3;i++)
{
PRINTF(" Dado gravado %01i = %02X \n",i+1,masterRxData);
}
Delay();
When I make 0xC7 chip erase, turn off the board, turn on, change to 0x20 it writes and i read the correct datas.
Or when I make 0x20 and put Escreve_NOR(0x20,5); //Erase Sector, and then I change the program and put again
Escreve_NOR(0x20,4; //Erase Sector but with 4 write and read correct. What is the problem with this NOR FLASH???? Anybody can help me, i read the driver but nothing works. I am thinking this NOR not work well. There is a big problem with this NOR. The commands 0x90 and 0x9F I send and read the data always
Solved! Go to Solution.
- Labels:
-
Serial NOR
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Flash devices go busy and require a longer delay after any program or erase operation (several us for program, several ms for erase).
Thus, immediately after starting a program or erase operation, you need to poll the status register and wait until the device is done.
Then the code should work, i.e. it can directly continue with other operations.
--Gernot
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Thank you for contacting Cypress Community Support. We have received your inquiry and currently reviewing the issue. We will get back to you as soon as we find the resolution.
Have a nice day
Regards,
Bushra
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Flash devices go busy and require a longer delay after any program or erase operation (several us for program, several ms for erase).
Thus, immediately after starting a program or erase operation, you need to poll the status register and wait until the device is done.
Then the code should work, i.e. it can directly continue with other operations.
--Gernot
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you, i got it
2018-07-20 5:46 GMT-03:00 geho <community-manager@cypress.com>:
<http://www.cypress.com>
Cypress Developer Community
<https://community.cypress.com/?et=watches.email.thread>
I am trying to erase but not function correctly on s25fl164K
reply from geho
<https://community.cypress.com/people/geho?et=watches.email.thread> in *Nor
Flash* - View the full discussion
<https://community.cypress.com/message/163499?et=watches.email.thread#163499>