karim zbiba

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

Discussion created by karim zbiba on May 16, 2011
Latest reply on May 18, 2011 by Jiri Rezler



 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