| Author | beginning argument ( Replies received: 1 ) |
| ch.tichawa |
Posted 02-12-2008 at 13:17   |

Registered on : 12-02-2009
Messages : 1
OFF-Line
|
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?
|
|
|
Profile
Quote
|
| stefan.nischwitz |
Posted 12-12-2008 at 10:55   |

Registered on : 09-19-2009
Messages : 4
OFF-Line
|
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 ]
|
|
|
Profile
Quote
|