www.beck-ipc.com

@CHIP-RTOS C Library V2.06 - BIOS API


BIOS_Install_Error_Handler

Install a user fatal error handler.

void BIOS_Install_Error_Handler ( USER_ERROR_HANDLER vector );

Parameters

vector

Far pointer to callback procedure.  Set to zero to un-install the handler.

Return Value

-- none --

Comments

The user can install an error handler function, that will execute if a fatal error occurs in an application or inside of the @CHIP-RTOS.

The callback function must be be from:

    void huge _pascal Err_Handler (int error_code)

The error_code input parameter can have the following values:
    1:   Invalid opcode (usually caused by corrupted memory), the calling task is suspended
    2:   Fatal kernel error (usually caused by corrupted memory or a task stack overflow)
    3:   Fatal internal TCPIP error, calling task is supended
    4:   TCPIP stack reaches memory limit
    5:   TCPIP memory allocation error
    6:   Ethernet bus error (hardware defect)
    7:   Ethernet link error(cable not connected?)
    8:   Flash write error -> Flash defect (IPC@CHIP® is no longer usable)
    9:   Low Memory error -> called if an alloc (system or user) failed
In all cases we recommend a reboot with BIOSint 0xA0 0x21 (see below). If the flash device has a defect, the IPC@CHIP® is no longer usable
Important:
    Do not use any message printing inside your error handler if errorcode is 3 or 4 and telnet is part of your stdio.   In this case your exit handler would hang inside of the print call.

See Also

RTOS API

This library function invokes a RTOS software interrupt.   Refer to this RTOS API function's documentation for more details.

Supported since or modified in @CHIP-RTOS version

    SC12SC13SC11SC1x3
    V1.10V1.00V1.00V0.90

This API List
List of C Libraries
@CHIP-RTOS Main Index


End of document