Skip to main content
ch2399
Associate
December 12, 2008
Question

Flash Registers

  • December 12, 2008
  • 2 replies
  • 832 views
Posted on December 12, 2008 at 06:25

Flash Registers

This topic has been closed for replies.

2 replies

ch2399
ch2399Author
Associate
December 2, 2008
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
December 12, 2008
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 ]