My threads aren't starting as expected. What's wrong?


Ensure that you give as much information to the compiler in the if()..else if()..else expressions as possible. Explicitly test lsr, m1/m2, pin, and flag0/flag1. Most importantly, add the hsr test explicitly, as the first term evaluated in an if() expression. Remember that hsr is always tested whether or not it's present in the thread expression. If it's not there, it is tested against a hsr value of 0.

Also note whether the #pragma ETPU_function directive specified the standard or alternate condition code encodings.