Zephyr Hierarchical State Machines: Verify Entry and Exit Actions at Transition Boundaries
A hierarchical state machine is correct only when its actions match the transition boundary. Moving between sibling states should not tear down their shared parent’s resource; leaving that parent should. In Zephyr SMF, verify the action sequence directly rather than checking only the final state pointer. A machine can arrive at the right state after…