I got the EventRecorder to work at last, but in the component tab it doesn't show the name of the threads. They are all called "RTX Thread". I already entered a name in the osThreadAttr_t, but it is not visible during debugging. I can also see the thread_id in HEX format, but I would have to know those by heart which is not practical.
I had to revert back to an old code and I made the same changes to see events. Now the System Analyzer never shows thread, although the Event Recorder is active and working...
Adam Lins said:Concurrent execution of threads is not the same as concurrent execution of instructions from different threads. System Analyzer says multiple threads are in the RUNNING state. That doesn't mean the instructions for the code in each thread are executing concurrently at the timescale of the CPU clock.
It makes sense that not every instruction is visible in the Event Recorder or System Analyzer.
Adam Lins said:Instead of osThreadYield() I prefer to wait for signals sent to the thread (which can be set in an ISR) and/or timers. That means most of the time is spent in the RTOS idle thread. On the other hand, use of osThreadYield() could be appropriate for your design. Unless things aren't working as desired.
This is a good tip. I will try to maximize the performance after everything has been implemented.
Thank you for your extended explanations and your time. It has been really helpful!