Unless something else outside my main would cause this (middle ware or like) I'm out of ideas why this is not looping.
in h file osThreadId KA;
in main project
osThreadDef(KA_CODE_MS, osPriorityNormal, 1, NULL); KA = osThreadCreate (osThread(KA_CODE_MS), NULL);osDelay(200U); while(1) { printf("."); } void KA_CODE_MS(void const *arg) { CANWrite_MS(ECU_ID_GM_1, ka); osDelay(1000U); printf("KA MS\n"); }
the code runs then outputs the following text and seems to continue to run according to the debugger but prints nothing further. CANWrite_MS is also only shown once on the CAN wire.
..................(many more dots).........................KA MS
didn't realize the thread only ran once per design. Fix with while loop.
And for some reason the printf, was also cause the loop to stop. I had to remove that?
I had to remove that?
Are you expecting an answer?
Was curios if there is a reason a printf can not be in a thread like that, yes. Was thinking it was because of the debugger requiring a single thread to preform but would have excepted the printf to be ignored and for it to move on.
>>Was curious if there is a reason a printf can not be in a thread like that, yes.
Most likely downstream code blocking, implement suitable buffering scheme rather than spinning on TXE in your hosting code.