9S08MP16 Flash (reserve a partition for system warning and fault in the 16KB Flash)

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

9S08MP16 Flash (reserve a partition for system warning and fault in the 16KB Flash)

458 Views
kazbi
Contributor I

Hello,

 

 I´m using the DEMO9S08MP16 (16KB Flash) on my prototype with Code Warior Processor Expert and I would like to use some adresses for my fault handling.

 

I have 10 Fault and I set the memory area0 size to 3FA4. so it beginn from 0xFFA4 to 0xFFAD.

but I in the non-volatile memory is only 00 in all reserved adresses???

 

When a fault (B) or warning(A) occurs it schould be saved wtih the defined function.

So as following, I choose the adresses( 0xFA00, 0xFA01...).

 

#define D_V_Warning() IFsh1_SetByteFlash(0xFFA4,10)

 #define D_V_Fault() IFsh1_SetByteFlash(0xFFA4,11)

 #define D_T_Fault() IFsh1_SetByteFlash(0xFFA5,11)

 #define D_T_Warning() IFsh1_SetByteFlash(0xFFA5,10)

 #define D_L_Fault() IFsh1_SetByteFlash(0xFFA6,11)

 #define D_C_Fault() IFsh1_SetByteFlash(0xFFA7,11)

 #define D_C_Warning() IFsh1_SetByteFlash(0xFFA7,10)

 #define B_V_Fault() IFsh1_SetByteFlash(0xFFA8,11)

 #define B_V_Warning() IFsh1_SetByteFlash(0xFFA8,10)

#define B_T_Fault() IFsh1_SetByteFlash(0xFFA9,11)

 #define BORD_T_Warning() IFsh1_SetByteFlash(0xFFA9,10)

#define B_Ion_Fault() IFsh1_SetByteFlash(0xFFAA,11)

#define B_Ioff_Fault() IFsh1_SetByteFlash(0xFFAB,11)

#define INF_Fault() IFsh1_SetByteFlash(0xFFAC,11)

#define PYRO_Fault() IFsh1_SetByteFlash(0xFFAD,11)

 

 Best Regards Kazbi

Labels (1)
0 Kudos
1 Reply

273 Views
jiri_rezler
NXP Employee
NXP Employee

Hello,
 
could you please specify what exactly do you need to do? Why do you not store these flags in RAM? Please note that Flash is not intended to store such flags for continually running the code (Up to 100,000 program/erase cycles at typical voltage and temperature).
 
However value 0x00 in a flash memory means, that this space is not cleared. Value of the cleared flash memory is 0xFF. When you need to rewrite a memory byte that contains 0x00 you have to do the following.
a)  Because sector size of Intflash memory on MP16 is 0x200 and you need to continuously update the flash memory, you have to extend the whole 0x200 from regular linking process. You can do this by setting Size to 0x3DAE
b)  To ensure that only requested flag will be modified, set the "Write method" property in intFlash component to "Safe write (with save & erase)" (erase sector size for flash is 0x200 => this space must be reserved for your fault/warning access).
 
Best regards
Jiri Rezler

0 Kudos