I'm working with embOS 3.52e on LPC2138/01, IAR 4.41 toolkit.
The application is fairly simple, and currently is running with four tasks. When I look at the CPU utilization, all tasks are typically sitting at less than 0.5%. Several times per minute the utilization of one task goes way up and often sits at 100% for many seconds. There are also periods of "noise" where the utilization only goes up a few percent and maybe spikes to 10%. I have tried to test the system responsiveness by typing into a serial port. The system responds quickly and the output does not appear to be delayed at all. The task window on embOSView shows the one task at 100% or near it for the whole time. As best I can tell it does not matter if I assign the one active task the highest pri or lowest. It looks to me that the 100% utilization is not correct.
Currently all but one are sleeping on long calls to OS_Delay or waiting on events that never happen. The one active task is awakened by OS_GetMail(), which is signaled by an ISR call to OS_PutMailCond() every 10ms. I have put calls in the code to set and clear test points when the code is executing the ISR that awakens the task. Also, in the task itself so I can see how long it is executing between times when it waits on the empty mailbox. The ISR and the task both execute in about 10us, which is close to 0.1% load each, not counting overhead. For the purpose of testing I have tried the code with all task functionality disabled, so the task only has to read the mailbox until it is empty.
Any suggestions or insight into what is causing this or how I can debug it ?
Thanks,
George
The 10ms period is
The application is fairly simple, and currently is running with four tasks. When I look at the CPU utilization, all tasks are typically sitting at less than 0.5%. Several times per minute the utilization of one task goes way up and often sits at 100% for many seconds. There are also periods of "noise" where the utilization only goes up a few percent and maybe spikes to 10%. I have tried to test the system responsiveness by typing into a serial port. The system responds quickly and the output does not appear to be delayed at all. The task window on embOSView shows the one task at 100% or near it for the whole time. As best I can tell it does not matter if I assign the one active task the highest pri or lowest. It looks to me that the 100% utilization is not correct.
Currently all but one are sleeping on long calls to OS_Delay or waiting on events that never happen. The one active task is awakened by OS_GetMail(), which is signaled by an ISR call to OS_PutMailCond() every 10ms. I have put calls in the code to set and clear test points when the code is executing the ISR that awakens the task. Also, in the task itself so I can see how long it is executing between times when it waits on the empty mailbox. The ISR and the task both execute in about 10us, which is close to 0.1% load each, not counting overhead. For the purpose of testing I have tried the code with all task functionality disabled, so the task only has to read the mailbox until it is empty.
Any suggestions or insight into what is causing this or how I can debug it ?
Thanks,
George
The 10ms period is