Question
STM32F401RE threads on bare metal
I need to make a "multi threaded" application, my mentor told me this, and I quote
"
you should create a thread by yourself
use any system timer, e.g. simple tick timer
"
I do not really understand this, but he gave me some example pseudocode, hopefully someone can decipher what he meant.
int main(void){
uint8_t done{0};
while (1)
{
thread_Xms(&done);
if(done & 1)
{// exactly 1 ms loop
function_LED_1ms(); //< no any delay sould be contains!!!
function_Input_1ms();//< no any delay sould be contains!!!
function_ETC_1ms(); //< no any delay sould be contains!!!
}
if(done & 0x80)
{// exactly 1 sec loop for example
// TODO something every 1 sec
}
}
}
