cancel
Showing results for 
Search instead for 
Did you mean: 

i can not erase or write to the secondary flash

guyl
Associate II
Posted on April 16, 2003 at 16:08

i can not erase or write to the secondary flash

2 REPLIES 2
guyl
Associate II
Posted on May 17, 2011 at 11:53

I'm programming Flash Loader IAP for uPSD3200 family chip .

In the VM registerthe configuration is for Boot_Code and Flash_Data.

I succeed to erase and write all the sectors in the main flash .All the sectors of the main flash reside in addresses 0x8000-0xFFFF .

My problem is that i can not erase or write to the secondary flash (32k)-flash boot which is the common area .

When i'm using the upload option of the JTAG FlashLink in the PSDsoft Express and dumping the flash boot into a file i see at the beginning of the file the following intel-hex format record :

:020000024000BC

Which means that the flash boot resides in addresses of 0x40000-0x4FFFF .

Is that correct?

How do i access the flash boot addresses for erase and re-program?

joseph2399
Associate II
Posted on May 17, 2011 at 11:53

Make sure your code to erase the Secondary Flash, is not the same Flash sector you want to erase, i.e. you can not erase the sectors where you execute your code from. The Boot Flash address should be set at where ever you mapped your Boot sectors to. Please see the attached EEPROM emulation code, in it (eeprom.c) you will find a subroutine to erase a Secondary Flash sector.