movie_freak
Member level 5
I have a little.. weird kind of situation and I am unable to find a particular reason..
My program flow:
My Situation:
After some time of proper execution my code behaves abnormal and I am unable to figure out whether its a crash without restart, a restart or corruption
What happens:
After some time of proper execution I can see an indication of power on again, at this particular point all the initialized eeprom variables are blank and erased, and the code does not work as intended, also before this power on indication if the controller had a restart it should show variable and other initialization indications which is not showed in this situation (whereas in contrast, a manual power reset these indications do work)
So as we can see that the code is designed in a way that the power on indication should only come when the controller is reset, and if my eeprom and variables indications are not showing it seems to me as if the code is jumping with corruption
So I want help:
--- I wanna know what are the steps i can now take to further deepen and narrow the faulty area of my code
-- and if some one could have already faced this kinda problem then what could be the issue?
-- What could be the possible causes?
Many Thanks,
Surya
My program flow:
Code:
//global variables
int g_power_on_F = 1;
main()
{
//initialization of variables and copy some from eeprom
//other initializations
//indicate variable and other initializations
while(1)
{
if(g_power_on_F == 1)
{
indicate power on
g_power_on_F = 0;
}
all other states of my system
}
}
My Situation:
After some time of proper execution my code behaves abnormal and I am unable to figure out whether its a crash without restart, a restart or corruption
What happens:
After some time of proper execution I can see an indication of power on again, at this particular point all the initialized eeprom variables are blank and erased, and the code does not work as intended, also before this power on indication if the controller had a restart it should show variable and other initialization indications which is not showed in this situation (whereas in contrast, a manual power reset these indications do work)
So as we can see that the code is designed in a way that the power on indication should only come when the controller is reset, and if my eeprom and variables indications are not showing it seems to me as if the code is jumping with corruption
So I want help:
--- I wanna know what are the steps i can now take to further deepen and narrow the faulty area of my code
-- and if some one could have already faced this kinda problem then what could be the issue?
-- What could be the possible causes?
Many Thanks,
Surya