Access to nor flash while running from flash.

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

cross mob
Anonymous
Not applicable

Hello,

   

We used S29GL256M with MPC866 in an old product. We need to erase the sector of the flash which is used for configuration parameters, and then rewrite the sector with updated parameters while we run the code from the same flash. Of course the code area and the configuration parameters area are in different sectors of the flash. Is it possible to erase and write sectors of a flash while running the code from a different sector of the same flash? We tried but we couldn't be able to do it. The processor hangs after writing a command to the flash.

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

Hi,

   

You cannot erase/program on sector and read from another sector at the same time using the device S29GL256M. If you start an erase or program operation in the flash device, it will be giving polling data to check completion of the embedded operation (erase/program) when you perform a read operation right after erase or program. Please refer the polling information given in the datasheet for more information.

   

So, you have to finish erase/program operation before performing a read operation.

   

Thanks and Regards,

   

Sudheesh

View solution in original post

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

Hi,

   

You cannot erase/program on sector and read from another sector at the same time using the device S29GL256M. If you start an erase or program operation in the flash device, it will be giving polling data to check completion of the embedded operation (erase/program) when you perform a read operation right after erase or program. Please refer the polling information given in the datasheet for more information.

   

So, you have to finish erase/program operation before performing a read operation.

   

Thanks and Regards,

   

Sudheesh

0 Likes
Anonymous
Not applicable

Hi,

   

You have to run some special flash access functions from ram for example: polling function. If you don't want to wait the whole erase time then you may make use of the erase suspend/resume feature. You can monitor your interrupt events to decide whether to suspend the erase. So after the erase is suspended, you can read from other sectors. Please refer to AN99127 for Simultaneous Read/Write versus Erase Suspend/Resume. http://www.cypress.com/file/206221/download

   

Thanks,

   

Charles

0 Likes