Debugging the CPU load

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Debugging the CPU load

Philipp Burch-2
Hi everyone,

we have an Ethernut heartbeat LED connected to our MCUs as a quick check
of the global CPU/thread load. Despite the firmware runs without issues,
we recently found that some projects exhibit a constantly-on LED, i.e. a
100% CPU load. The available diagnosing facilities show that all threads
are in the SLEEP state (except for the idle thread) most of the time, so
it is not apparent that a single thread just eats up all available CPU time.

Is there some functionality available to find the CPU load per thread?

Thanks and best regards,
Philipp
_______________________________________________
http://lists.egnite.de/mailman/listinfo/en-nut-discussion
Reply | Threaded
Open this post in threaded view
|

Re: Debugging the CPU load

Nathan Moore-5
Hey Phillip,
Are you sure that you’ve wired the LED properly to match the code?  If the
code is written for the LED to illuminate when the pin is low but the LED
is wired to illuminate when the pen is high then wouldn’t that cause your
issue?
I haven’t touched Ethernut in almost 10 years, but just a thought.

Good luck,
Nathan
_______________________________________________
http://lists.egnite.de/mailman/listinfo/en-nut-discussion
Reply | Threaded
Open this post in threaded view
|

Re: Debugging the CPU load

Uwe Bonnes
In reply to this post by Philipp Burch-2
Philipp Burch writes:

> Hi everyone,
>
> we have an Ethernut heartbeat LED connected to our MCUs as a quick check
> of the global CPU/thread load. Despite the firmware runs without issues,
> we recently found that some projects exhibit a constantly-on LED, i.e. a
> 100% CPU load. The available diagnosing facilities show that all threads
> are in the SLEEP state (except for the idle thread) most of the time, so
> it is not apparent that a single thread just eats up all available CPU time.
>
> Is there some functionality available to find the CPU load per thread?
>
Can you debug with a debugger:
Source ethernut/nut/tools/gdb/nutos.py in xxx-gdb-py and have a look
at the thread.  Otherwise the SWO tools at
https://github.com/orbcode/orbuculum.git, especially opbtop can be of
help.

Bye
--
Uwe Bonnes                [hidden email]

Institut fuer Kernphysik  Schlossgartenstrasse 9  64289 Darmstadt
--------- Tel. 06151 1623569 ------- Fax. 06151 1623305 ---------
_______________________________________________
http://lists.egnite.de/mailman/listinfo/en-nut-discussion
Reply | Threaded
Open this post in threaded view
|

Re: Debugging the CPU load

Philipp Burch-2
Hi Uwe!

On 03.09.20 18:05, [hidden email] wrote:

> Can you debug with a debugger:
> Source ethernut/nut/tools/gdb/nutos.py in xxx-gdb-py and have a look
> at the thread.  Otherwise the SWO tools at
> https://github.com/orbcode/orbuculum.git, especially opbtop can be of
> help.

Thanks for the hint, I will see what I can do with it. We usually only
work with the bootloaders on the boards, I need to get access to the
hardware with an external debugger first...

Bye,
Philipp
_______________________________________________
http://lists.egnite.de/mailman/listinfo/en-nut-discussion