cancel
Showing results for 
Search instead for 
Did you mean: 

Accessing Flash Registers

hans239955
Associate II
Posted on May 16, 2005 at 06:39

Accessing Flash Registers

3 REPLIES 3
hans239955
Associate II
Posted on May 13, 2005 at 16:26

I've bootloaded some code to reprogram the ST10 Flash, but when the code attempts to access the Flash registers an exception occurrs. I've enabled XFLASh in XPERCON and XBUS in SYSCON and have declared a flash register as *( unsigned int huge *)(0x000E0000).

What else am I missing?

najoua
Associate II
Posted on May 16, 2005 at 06:08

Check also that ROMEN bit in SYSCON register is set.

[ This message was edited by: Najoua on 20-12-2006 16:29 ]

michele239955
Associate II
Posted on May 16, 2005 at 06:39

For example;

_huge unsigned int* FCR0H_reg;

FCR0H_reg = (_huge unsigned int*)(0x000E0002);

*FCR0H_reg=0x2000; //word program

Are you doing in this way? If so and you have enabled XFLASH, XBUS and ROMEN=1, it should be working. Remember that if you want to write B0F0, B0F1, B0F2, B0F3 in bootstrap mode you have to address them through 0x01xxxx addresses.