Other Parts Discussed in Thread: SYSBIOS
Hello,
I have some questions about Idle task functions. If I understand correctly Idle task is created and managed by SYS/BIOS where each Idle functions are called periodically and sequentially.
I would like to implement an algo. based on periodically time elapsed, that's why I think Idle task could be a good choice. For each function call a state machine is updated and make some stuff.
Please correct me if I am wrong: Using Idle task for this purpose is not advised, because I need to preserve and update the state machine value between each function calls, so the variables declared in idle functions are locals. -> I need to use Global variables. That also increase the complexity of the code. Consequently idle functions must be very simple: such as GPIO_Toggle(), and system_printf().
I do more better if I make a standard Task() and instantiate a timer for periodic calls, the variables defined in Task are accessible locally and no globals are required.
I would like to know that my conclusion is right or wrong.
Thank you for your reply