cancel
Showing results for 
Search instead for 
Did you mean: 

Flash Registers

ch2399
Associate
Posted on December 12, 2008 at 06:25

Flash Registers

2 REPLIES 2
ch2399
Associate
Posted on December 02, 2008 at 08:47

Am working with the ST10F276 and I'm trying to write to the XFlash memory.

When I try to access one of the flash registers (FCR0H, FARL, ...) the microcontroller stops working.

My code (Keil):

FCR0H = (unsigned int huge*)(0x000E0002);

*FCR0H =0x2000;

Does anybody know why this problem occurs?

stefan
Associate II
Posted on December 12, 2008 at 06:25

Well, i´m not sure about this...

If you haven´t solved the problem yet, try indirect addressing to Flash Control Registers. Direct addressing mode (FCR0H = 0x2000) is not allowed to Flash Control Registers.

Try:

FCR0H |= 0x2000 for the WPG Bit

You can also try to read out the Flash Error register FER. Bit SEQUER should be set if this was your problem.

[ This message was edited by: stefan.nischwitz on 12-12-2008 13:03 ]