2 Replies Latest reply on Aug 15, 2017 8:17 PM by cchc

    Access to nor flash while running from flash.

    abaykal_2627851

      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.

        • 1. Re: Access to nor flash while running from flash.
          sdhk

          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

          • 2. Re: Access to nor flash while running from flash.
            cchc

            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