2005-05-19 08:30 PM
2005-05-19 12:30 PM
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?2005-05-19 08:30 PM
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 ]