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 Usage program

I am looking for a way to measure CPU usage. We need to know how heavily loaded a Cygnal C8051F020 is and which processes are consuming the most time.

Thanks in advance, Bill

Parents
  • Do you have an idle task/loop or something similar that MCU does when it has nothing to do?

    If you don't, it's going to be kind-of hard to measure how loaded the MCU is because it's always doing something.

    If you do, you can simply set a port bit before the idle task/loop and clear it when the program exits the idle task/loop. You can use a scope to calculate the duty cycle.

    Jon

Reply
  • Do you have an idle task/loop or something similar that MCU does when it has nothing to do?

    If you don't, it's going to be kind-of hard to measure how loaded the MCU is because it's always doing something.

    If you do, you can simply set a port bit before the idle task/loop and clear it when the program exits the idle task/loop. You can use a scope to calculate the duty cycle.

    Jon

Children