The error code management system maintains the error code corresponding to the most recent failed operation. System functions update this code only when a failure occurs. The current error code can be retrieved using the stGetLastError function and explicitly set via stSetLastError. If Sirius RTOS is utilized (i.e., OS_USED is set to 1), these functions are automatically replaced with thread-safe equivalents designed for multitasking environments. Error codes should be stored in variables of the ERROR type. A comprehensive registry of all defined error codes is provided in the error codes list section.