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.
So as following, I choose the adresses( 0xFA00, 0xFA01...).
#define DLK_V_Warning() IFsh1_SetByteFlash(0xFA00,10)
#define DLK_V_Fault() IFsh1_SetByteFlash(0xFA00,11)
#define DLK_T_Fault() IFsh1_SetByteFlash(0xFA01,11)
#define DLK_T_Warning() IFsh1_SetByteFlash(0xFA01,10)
When a fault (B) or warning(A) occurs it schould be saved wtih the defined function.
My Problem:
I don´t know how I can reserve some adresses for my fault and warning handling witout perturbing my realtime program in the flash.
Best regards
kazbi
Hello,
I think that better way will be to set your flags to end of non-volatile memory, that means exactly to 0xFFAC and 0xFFAD and after that exclude this area from linking process of your regular code using the following steps:
- go to the build options tab in CPU component
- Set Size of the Memory Area0 (Name: ROM) to 3FAC
best regards
Vojtech Filip
Processor Expert Support team
Thank you Filip,
I try your konfiguration, but I in the non-volatile memory is only 00 in all reserved adresses.
I don´t see the fault or Warning??
I have 10 Fault and I set the memory area0 size to 3FA4.
so it beginn from 0xFFA4 to 0xFFAD.
#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