Hi people,
I'm a bit stuck with a serious problem at work using the Keil C51.
I've modified a FW that was working fine, I add many functions, but they only call once as long as the EEPROM is new, and once the task is done, they are never called again.
What happened ?
I started to have problems with functions that were working properly just before. What I find out, that the failure was only cuased by some boolean field that are used to control the flow inside the function. As long as I change the boolean type with a byte (just a 8 bit wide flag) the problem dissapers. Three different and good working functions had this issue and the issue has gone when bit flags were changed to bytes.
Now, although I get the thing running I'm very frightened, and completely lost about this failure. Have someone experimented something like that. Any clue. I don't want to patch the FW anymore. I want to discover where the issue is.
It's quite difficult to help without knowing the FW, but believe me that all the things I added call once when the product is bring to life and then they remain unused.
The functions are managed by a FSM in a nonblocking fashion as expected.
I had some failure with other FW just one byte before the RAM space had overflow. The program crashed and crashed. I added one var and realizaed the RAM was full. I cleaned several bytes and the crashes stoped. Just seems like the overlaying feature was failling due to the no left RAM. I was wondering if this problem could be a compiler realted, or .A51 related ....
A little notice:
I was getting a "recursive call" warning form C51. I changed the FW in order to not get this anymore. At first I thought the problem were related to this, but the warning sttoped and the problem continued to happen.
I doesn't happen in all boards and all the times you try but happens.
Suggestions or clues are very welcomed
Many thanks for your time
Pedro.