Advanced LAN Bypass User Manual
32
These header files (cf. Section 3.4) provide the following macros, which are used at
different FW upgrade stages:
3.7.6.3
lbp_err lbp_upgrade_fw(int segment, char *image_file)
Upgrades the LAN Bypass MCU FW.
A character pointer (parameter image_file) is used to specify the image file name
(with the file path). For example, a user application may perform a FW upgrade on
Segment 1 by using the following function call:
lbp_upgrade_fw(1, "./lbp_fw_RU_00_22.bin")
The file operation will be performed internally in the function.
Returns 0 on success or the following error codes in the event of an error:
3.7.7
LBP Reset Monitoring
On standard x86 platforms, a reset signal may be triggered by system components
during system booting. This action may be taken by BIOS or by the chipset to recon-
figure the PCIe bus. As such, LAN Bypass MCU will treat this reset as a new event
and will perform the defined action for a POWER RESET event.
However, it may cause unexpected and undesirable behavior. For example, when the
system is powered on, the last event should be POWER ON when the system boots
/* Macros for Upgrade MODE */
#define lbp_is_in_ap(x) ((x & 0x10) == 0x10) //
FW is running in application model, not in upgrade mode
#define lbp_is_in_bootloader(x) ((x & 0x20) == 0x20) //
FW is running in upgrade mode
#define lbp_is_bl_idle(x) ((x & 0x2f) == 0x20) //
FW upgrade process is started
#define lbp_is_bl_write_complete(x) ((x & 0x2f) == 0x21) //
FW upgrade is on going
#define lbp_is_bl_flash_error(x) ((x & 0x2f) == 0x22) //
FW upgrade fails
#define lbp_is_bl_wrong_data_format(x) ((x & 0x2f) == 0x23) //
Fail to receive upgrade image file
Table 3.26: API Function "lbp_upgrade_fw" Error Codes
Name
Error Code
LBP_ERR_OPEN_FILE
0x80
LBP_ERR_INTERFACE_OPEN
0x89
LBP_ERR_FW_NRDY
0x8A
LBP_ERR_FW_CS
0x8B
LBP_ERR_DATA_FORMAT
0x8C
LBP_ERR_GET_FW_MODE
0x8D
LBP_ERR_UNLOCK_FLASH
0x8E
LBP_ERR_SWITCH_TO_BOOTLOADER 0x8F
LBP_ERR_START_TRANSFER
0x90
LBP_ERR_SWITCH_TO_APP
0x91
LBP_ERR_COMMUNICATION
0x92
LBP_ERR_PARAM_OUT_OF_BOUND 0x93
LBP_ERR_PARAM_NULL_POINTER
0x94
LBP_ERR_LBP_INIT
0x95
Summary of Contents for LAN Bypass
Page 1: ...User Manual Advantech Advanced LAN Bypass...
Page 4: ...Advanced LAN Bypass User Manual iv...
Page 10: ...Advanced LAN Bypass User Manual x...
Page 11: ...Chapter 1 1 ADVANCED LAN BYPASS...
Page 14: ...Advanced LAN Bypass User Manual 4...
Page 15: ...Chapter 2 2 OVERVIEW...
Page 26: ...Advanced LAN Bypass User Manual 16...
Page 27: ...Chapter 3 3 LIBLBPCU ADVANCED LAN BYPASS LIBRARY...
Page 51: ...Chapter 4 4 LBPCU...
Page 79: ...Appendix A A OS limitation...
Page 81: ...71 Advanced LAN Bypass User Manual Appendix A OS limitation...