Originally Posted by
jimblumberg
What do you mean by stopped? It should stop/delay for 1 milisecond. I suggest post the smallest possible program that illustrates your problem. If the program doesn't compile provide the complete error messages exactly as they appear in your development environment.
Jim
My compiled program is running on a picoflash single board computer from JK microsystems imbedded in a critical process controller designed by the company I am supporting. The source code is 404 pages long when pasted into Word. Most of that code is needed to get the system up and running so the smallest program I can use is way beyond the scope of this forum. But, I have added print statements that print to the processor terminal so I can see step by step what is happening.
The section of code of interest is inside a loop. The code of interest is:
Code:
printf("#124 time = %02d:%02d:%02d\n", tm.ti_hour, tm.ti_min, tm.ti_sec);
SendResp(RspPtr);
sleep(1);
This works fine. I can watch the terminal and see each printout that includes the time as the program goes through the loop over and over again.
When I change the code to
Code:
printf("#124 time = %02d:%02d:%02d\n", tm.ti_hour, tm.ti_min, tm.ti_sec);
SendResp(RspPtr);
delay(500);
There are no errors and no warnings.
After downloading the .exe to the board, everything runs fine until I get to the loop. Then I see the first printout and then nothing more appears on the terminal. I have to shut off the power to get the processor to run again.
I have tried
Code:
printf("#124 time = %02d:%02d:%02d\n", tm.ti_hour, tm.ti_min, tm.ti_sec);
SendResp(RspPtr);
delay(1);
and that doesn’t work either.
Jerry