Erasing a sector not possible

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Erasing a sector not possible

1,093 Views
abhijithshankarenn
Contributor I

Hi,
   I am using S32K142 board. I am having a peculiar problem.

  The P -flash starts from 0x0000 0000 till 0x0003 FFFF

  I am placing my application from 0x0000 2000 till 0x0002 F000

  I am having another section that starts from 0x0003 0000 till 0x0003 8000 defined in my linker file
  

   The issue is i am unable do any of the flash operations that is Write or erase this location. 

  Note: If  i am having my that section defined in D-Flash erasing and writing to that location is not at all a problem.

Could please explain what is that I am going wrong here ?

I am unable to erase a particular sector of my flash where my application is sitting.
But other portion of NVM that is D-falsh there is not problem.


Regards
Abhijith Shankar


0 Kudos
Reply
1 Reply

1,087 Views
kef2
Senior Contributor V

Flash memory is not readable while it is being programmed/erase/or any other flash controller command is being executed. You need to move to code in RAM, launch prrogram/erase command while PC points to RAM and not exit back to flash until command is complete. Unless you move your ISR's and vectors table to RAM, you need to disable interrupts as well for programm/erase period.