We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hello,
I'm building an embedded application on a Dallas DS89C450 microcontroller. RTX-51 Full Version is used as the RTOS.
Everything seems to work fine although I'm facing with two abnormal intermittent system failures which will be tried to be described as follows:
1. The system hangs for a while and the watchdog timer resets the system. However, there is no infinite loop in a critical section inside the code which may cause the task with the highest priority in the system to be ceased to work. This task is responsible for kicking the watchdog circuitry.
2. The flow of the code somehow jumps to somewhere which is not supposed to work at that moment. And this section of the code is responsible for clearing the EEPROM content on a user request. EEPROM is accessed by the processor thru its data/address bus.
A same simple test procedure is applied on the system repeatedly and thus, the state of the system doesn't seem to change. However, 2 or 3 times / 30 trials ends up with such a catastrophic result.
Here are my questions:
1. Can it be caused by a stack overflow? 2. Would you recommend me to increase task stack sizes? If yes, how much?
Any ideas?
Thanks in advance. Hakan
What is the stack address in the .map file???? Coding in C or assembler or both? any ISRs using 0 (default)? all interrupts same priority?
I know that program flow may jump to an undesired location if the PC is not popped from the stack properly after a function call. difficult to achieve except by stack under/overflow and, if you are coding in C only too small a stack can be the cause.
However, what I am confused is the fact that I continue developing my project, which means that I'm adding extra source code every single day, but the behavior does not change! la-la land is a big place, if it jumps to la-la land it does not matter where.
Erik