cancel
Showing results for 
Search instead for 
Did you mean: 

How to know why a thread doesn't start?

IVent.1
Senior

I have a thread that doesn't start. The thread is created with autostart and the function return successfully, but the thread doesn't start...I don't know why. What instrument of debugging are available to go deeper in this issue?

2 REPLIES 2
Sarra.S
ST Employee

Hello @IVent.1​,

Is there error messages or warnings related to this thread?

Check the priority of the thread, is it higher than other threads?

Check for resource contention, if this thread requires access to a resource used by another thread

Check that the thread doesn't contain any infinite loop

You can set a breakpoint at the beginning of your thread function and step through the code to see where it's failing...

Hope that helps!

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

IVent.1
Senior

Thank you @Sarra.S​ 

It was an interrupt that continuously triggers...another question, please...what does mean this message during debug <warning: while parsing threads: not well-formed (invalid token)>?

What mechanism do I have to check that a thread has gone out of the stack assigned to it? Thank you a lot.