cancel
Showing results for 
Search instead for 
Did you mean: 

Programming F276 IFLASH

hans239955
Associate II
Posted on May 20, 2005 at 05:30

Programming F276 IFLASH

2 REPLIES 2
hans239955
Associate II
Posted on May 19, 2005 at 21:30

Using code to prgram location 0x20000 based on data sheet:

FCR0H |= 0x2080; /* word program; IFLASH */

FARL = 0x0000; /* Address 0x20000 */

FARH = 0x0002;

FDR0L = 0x55AA; /*Load Data in FDR0L*/

FDR0H = 0x55AA; /*Load Data in FDR0H*/

FCR0H |= 0x8000; /* Start Programming*/

while ((FCR0L & 0x60) != 0) ; // Wait to complete

Gives me a prgramming error (FER = 0x41) which means I've done things out of order. But this is what the databook specifies!

Any ideas?

najoua
Associate II
Posted on May 20, 2005 at 05:30

Hello,

Your code is good !

I suspect a configuration mistake. Please, verify that:

- flash is enabled by setting ROMEN bit in SYSCON register

- XFLASH is enabled (by setting XFLASHEN bit in XPERCON register and XPEN bit in SYSCON register) in order to be able to access the flash registers.

Note that the register FER has to be software reset.

Please, let me know if the problem persists.

Najoua.

[ This message was edited by: Najoua on 23-05-2005 15:25 ]