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
>>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.