cancel
Showing results for 
Search instead for 
Did you mean: 

flash erase problem in run mode

lodedeschepper
Associate II
Posted on February 25, 2008 at 04:59

flash erase problem in run mode

2 REPLIES 2
lodedeschepper
Associate II
Posted on May 17, 2011 at 09:49

Hello all,

I ''finished'' writing a bootloader for our hardware till I noticed following problem:

When running the software in debug mode, the SW on bank 1 (= the boot bank at address 0) erases bank 0 (the non boot bank at address 0x80000).

and programs the code without any problem.

When running without debugger, the flash is not erased (the erase function returns after less than 2 seconds without any error (around 5 sec in debug mode)) and programming fails.

I found a lot of workarounds to solve the problem (fmi clk speed less than 25 (24Mhz in bootcode), flash memory status register bit 7 workaround (see errata) implemented, I even tried to run the erase functions from RAM, modifeid the fmi wait states, ...) but none of the solutions helped me.

Im working with the STR912FW44X6 Rev D (produced 0647)

Compiler: GNU

Debugger: TRACE32

Anyone having any clue on this? Is there a difference between debug and run mode?

Thanks in advance,

LouisKatorz

lodedeschepper
Associate II
Posted on May 17, 2011 at 09:49

Hello all,

After a couple of days of rest I took up the flash erase problem.

I noticed that only one sector is erased and programmed. When trying to erase it manually in the debugger, the sector protected bit was set in the bank status register.

Up till now I ignored the protected mode of the flash (asuming that everything was unprotected), but found out that every sector in every bank is default write protected.

Best regards,

LouisKatorz