Hey Oz :)
Assuming that the active part of each thread runs much faster than 10ms, your thread frequency will roughly be 10ms + duration of active part of longest thread.
For a simple test, since 1/10ms = 100 Hz, i.e. audio band, simply toggle a spare output pin every time you enter the thread.
If you connect a speaker/headphone can listen to the tone - there are several apps on your smartphone that will measure the audio frequency. There are also several PC programs that measure frequency using your PC's sound card.
Of course, if you have an oscilloscope, use that!
Hi,
How can I calculate a threads frequency?
I am using Nucleo F767ZI which is running at 216Mhz system clock.
I have 3 thread (speed calculation, ROSserial communication, velocity control) and there are 10ms wait in each of them. Here is the main function that I use.
main
Do you have any suggestion? Is there a trick that i can use for printing threads frequency?