This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

CPU utilization is always 100% !

Hello all,
I am writing an RTOS for an XC167 (just for fun, believe it or not :-) ). while running it on the Keil IDE I constantly experience 100% CPU usage. I wrote a preemptive scheduler with a task switching frequency of 1[ms] (driven by GPT1). Is this behavior the result of the way the IDE simulates the processor? or maybe it is a programming mistake of some kind? or maybe it's not a mistake after all? all my tasks implement an infinite loop, of course. I use an interrupt to switch tasks, another for time measurements and another (but it also happens without it) to update user timer (to keep the time measurement latency as low as possible).
Kind regards,
Tamir Michael

  • By '100% CPU usage' you mean the CPU hosting the simulator, right? That's how the simulator works: it runs at the maximum speed possible all the time. Depending on the host CPU and current load, the simulator can be faster or slower than the actual XC167 CPU.
    Again, why don't you read the manuals first? It will save you a lot of questions like these.

    - mike