One of the most important features of the RT kernel is the State Checker, a debug feature that can be enabled by setting
One of the most common problems while using an RTOS is making sure that RTOS services are invoked from the proper context and/or system state.
Not all RTOS functions can be called from any context, for example, it makes no sense to invoke from an ISR a function that puts to sleep the current task/thread.
Usually RTOS functions include in the documentation the proper way and place to invoke them, the problem is that the thing is documented and not actually checked by the system.
The problem is exacerbated by the fact that this kind of errors often do not result in a clear malfunction but could cause rare and inexplicable crashes or malfunctions in the application.
When the State Checker is enabled the system state is checked each time an RTOS function is called at runtime, in case of violation the system is halted with an error code that can be retrieved using the debugger.
More details about ChibiOS debugging are available in the Debugging Guide.
The State Checker ensures that a whole class of very common errors related to RTOS use are found at development time. This greatly increases the odds that the final application code is as errors-free as possible.
The point is to not let such errors go unnoticed, if the applications runs with State Checker enabled then there is a high level of confidence that the RTOS use is correct. Just a note, the other class of common errors are stack overflows, the system offers support also for detecting those at development time.