In the recent future it is necessary for me to learn FSM to coordinarte tasks of FreeRTOS in a efficient way. I miss a lot of essential knowledge on the topic.
From the code of my company there are some inputs I got that I want to write to not forget it:
- The fsm code is an implementation of different high level papers that describe how tasks should be spawned.
- It is based on the principle that you have different states, like state factory, state reboot, state working, etc.
- The FSM receive events, and depending on the state it is going to answer in different ways.
- You want to be in IDLE all the time to be capable to receive events.
- The events spawn freertos tasks
- You never do delay on freertos
- Tasks needs to be thread safe, never share variables.