Advantech FWA1012VC - Stroller

FWA1012VC - Stroller Advantech - Free user manual and instructions

Find the device manual for free FWA1012VC Advantech in PDF.

📄 73 pages English EN 💬 AI Question
Notice Advantech FWA1012VC - page 9
View the manual : Français FR English EN

Download the instructions for your Stroller in PDF format for free! Find your manual FWA1012VC - Advantech and take your electronic device back in hand. On this page are published all the documents necessary for the use of your device. FWA1012VC by Advantech.

USER MANUAL FWA1012VC Advantech

Copyright 2024 All rights reserved. Advantech Corp. Ltd.

Ed2 office release 02/20/2024

- Update based on v1.14 10/23/2019

Update application note. Remove -GEPINTLVL and -INTCBTEST commands and corresponding APIs. Change API return values to signed value. Add -CHKINT command. Replace switch i2c mux to GPIO device cmd with ch 5.2.1 Add description for multi-process and mutex in chap4 08/22/2018

Updated draft content by review 07/20/2018

Add set priority of different ports and test in application note 04/18/2018

Add interrupt API and commands 03/16/2018

Initial versionAdvantech Copyright 2024. All rights reserved. Page 2 Table of Contents

5.2.1 Using kernel driver to control i2c-mux and i2c to gpio device. .................................... 65

This document describes the Advantech Power over Ethernet Control utility (APOECU) and related software APIs. Please check the utility release on the Advantech website or contact with your Advantech representative for details on supported products and SW versions.

Term Description API Application programming interface eth device Ethernet device

Firmware Host system x86 system PoE Power over Ethernet PoE MCU PoE micro controller APOECU Advantech PoE Control Utility LED Light emitting diode Libapoe Static library for Advanced PoE NIC Network interface controller NMC Network mezzanine card

Software UART Universal asynchronous receiver/transmitter USB Universal Serial Bus Table 1: TerminologyAdvantech Copyright 2024. All rights reserved. Page 9

1.3 PoE Architecture Overview

PoE may be supported on Ethernet ports hosted either directly on a motherboard such as onboard network ports or via add-in cards such as NMCs or PCIe NIC cards. LAN controllers, aka NICs, are connected to the CPU(s) via the PCIe interface. Figure 1: PoE Overview APOECU gives control over PoE functions through our products. For example, ethdev can be used to map to physical ports, to enable/disable PoE per ports, to configure AT/AF, power limitations, temperature, voltage, current, and port priority, and to get the port status. APOECU can support two types of PoE controller (PD69104 and PD69200) and can use the proper communication with different controllers. Please note that different controllers have different capabilities (see Chapter 3.5). Advantech also provides the PoE library for the advanced user to implement their own applications running on the host system, to access and modify the behaviour of the PoE MCUs, and to activate or use additional features via API.The interface between the host SW and the PoE MCUs is a UART interface. The PoE library is designed as a user space library and communicates directly with the NICs, allowing multiple SW instances to be run in parallel.Advantech Copyright 2024. All rights reserved. Page 10

The Advantech PoE mechanism adopts a UART connection between the host system and the PoE MCU(s).

Mostly, a centralized control application or OS is used to manage PoE on the system. In such a scenario, the control plane can still independently control the PoE controllers.

PoE solutions require an external power source via an extrenal cable from the system to the PoE device. This means that NMC-type PoE is not field side removable.

2.4 Identify Different PoE Devices (NMC/SOC)

The host system in Figure 2 uses USB <-> UART to identify and communicate with the PoE controller. Advantech NMC type PoE card also supports connection to the PoE controller on host system through UART port directly as in Figure 1. The interface can't be changed after it has been manufactured. Figure 2: Control Plan between a Motherboard and PoE DevicesAdvantech Copyright 2024. All rights reserved. Page 11

Advantech Advanced PoE has an LED on the LAN connector to indicate the current PoE state of each port. Please note LED doesn't support 10 Mpbs Link/Active. LED Indicator

PoE Off LED off 100, Link Yellow on PoE On LED on 100, Active Yellow blinking PoE is off, somethin g wrong Blinking 1Hz: (Port power is not active, overload or short circuit is detected on port output line) 3.3Hz (All ports) Vmain is out of range or over temp 1000, Link Green on 0.5Hz (A valid POE load is connected to port output lines, but PSE has no sufficient power for supplying the required load power.)

Port overload Port short circuit Port failed at startup 1000, Active Green blinking

0.4Hz Power Management event No Link OffAdvantech Copyright 2024. All rights reserved. Page 12 Table 2: Activity LED Behavior

Failed to open the file (cannot open the file or the file does not exist)

Failed to close the file

APOE library needs to be initialized before a function can be called

Command not supported by this PoE MCU

The NIC does not support PoE

Command received, but "Sub" fields do not match

Command received, but "Key" fields do not matchAdvantech Copyright 2024. All rights reserved. Page 13

Command received, but command checksum incorrect

Get system status telemetry: FW download is needed Table 3: Error CodesAdvantech Copyright 2024. All rights reserved. Page 14

3. LIBAPOE –ADVANTECH POE LIBRARY

Advantech provides a static Linux library (libapoe.a) and corresponding header file (libapoe.h) to integrate PoE control into customized applications.

3.1 Supported Distributions

Libapoe is a generic Linux user space library and thus is expected to work with most Linux distributions. Advantech uses up-to-date Ubuntu distributions (4.13.0-36-generic) to perform software quality assurance. For more details, please refer to the release notes delivered as part of APOECU.Advantech Copyright 2024. All rights reserved. Page 15

The following table lists all available API commands and the required version to support the API is highlighted accordingly: API Section Supported from FW version Supporte d from libapoecu version Supported from protocol version apoe_set_message_level

01.00Advantech Copyright 2024. All rights reserved. Page 25 Table 4: Supported API FunctionsAdvantech Copyright 2024. All rights reserved. Page 26

3.4 How to Use the API

To use the PoE library, please follow these steps: ⚫ Call the apoe_open function to allocate and initialize resources ⚫ Execute functions or operations ⚫ Call the apoe_close function to release the allocated resources

Declaration: apoe_err apoe_open(void); This function opens the PoE interface and checks the USB/UART interface mapping between the host system and PoE NMC.

This must be called first before any other PoE operations. Returns 0 on success or the following error codes in the event of an error: Name Error Code

Table 6: API Function ‘apoe_open’ Error CodesAdvantech Copyright 2024. All rights reserved. Page 27

Declaration: apoe_err apoe_get_lib_version(unsigned char *major, unsigned char *minor); This function returns the major and minor versions of libapoe. See the release notes for more information on libapoe versions. Returns 0 on success or the following error code in the event of an error: Name Error Code

Declaration: apoe_err apoe_get_fw_version(char *eth_device_name, unsigned char *major, unsigned char *minor, unsigned char *patch, unsigned char *product_number, unsigned char *parameters, unsigned char *build_number, unsigned int *internal_sw_number, unsigned char *chip_type); This function returns the FW version of the PoE MCU. See the release notes for more information on MCU FW versions. Minor , patch and product_number, parameters, build_number, and internal_sw_number are for the PD69200 only. Chip_type = 0: PD69200 is being used Chip_type = 1: PD69104 is being used Returns 0 on success or the following error codes in the event of an error: Name Error Code

-110Advantech Copyright 2024. All rights reserved. Page 28

Declaration: apoe_err apoe_reset(char *eth_device_name); This function resets the PoE MCU. The reset will cause PoE devices to reset themselves also. All ports will shut down and the PoE controller will reboot. This function is only available for the PD69200. Returns 0 on success or the following error codes in the event of an error: Name Error Code

Declaration: apoe_err apoe_restore_factory_default (char *eth_device_name); This function restores parameter values to the default factory values on the FW release. Ports will shut down after this command has been executed. This function is only available for the PD69200. Returns 0 on success or the following error codes in the event of an error: Name Error Code

-103Advantech Copyright 2024. All rights reserved. Page 29

3.5.5 APOE Port Operations

Declaration: apoe_err apoe_get_poe_device_status(char *eth_device_name, unsigned char *asic_status, unsigned char *ic_hw, unsigned char *temp, unsigned char *temp_alarm, unsigned char *chip_type); This function gets the POE device status. This API is only available for the PD69200. Asic_status: 0x00 None – no PoE device 0x01 OK – expected PoE device detection 0x02 ASIC is currently refreshed 0x04 ASIC error Ic_hw: Number of ports verified by the internal communication. 0 = Invalid/non-existing PoE device 4 = 4-port PoE device. 8 = 8-port PoE device. Temp: Temperature telemetry measured by the PoE device. If the PoE device does not exist, the response is 0xFF. This field can return a negative temperature (down to -40 °C). If the reported temperature value is greater than 205, then the real temperature will be 256 minus the reported temperature value. Units are in degrees Celsius. Temp_alarm is the upper temperature limit of this PoE device. Whenever the PoE device temperature exceeds the temp_alarm, an interrupt is triggered with the user-defined temperature event. Chip_type: enum poe_control_chip_type{ PD69200 = 0x00, PD69104, CONTROL_CHIP_TYPE_UNKNOWN,

Returns 0 on success or the following error codes in the event of an error: Name Error Code

Declaration: apoe_err apoe_set_eth_port_force_power(char *eth_device_name, unsigned char force_power_action); This function sets the port force power. Note: If you want to set FORCE_CONNECTION to a PoE port, you will need to call this function with FORCE_CONNECTION every time after you connect a PoE device to that PoE port. Force_power_action: #define FORCE_CONNECTION 0x01 #define NORMAL_CONNECTION 0x00 Returns 0 on success or the following error codes in the event of an error: Name Error Code

-102Advantech Copyright 2024. All rights reserved. Page 32

Declaration: apoe_err apoe_set_eth_port_power_limit(char *eth_device_name, unsigned int pre_defined_power_limit); This function sets the eth port power limit. Power_limit unit: 1 mW Power_limit should be less than MAXIMUM_ETH_PORT_POWER_LIMIT, which is defined as 30W #define MAXIMUM_ETH_PORT_POWER_LIMIT 30000 /* Maximum is 30000mW =30W */ Returns 0 on success or the following error codes in the event of an error: Name Error Code

Declaration: apoe_err apoe_get_eth_port_priority(char *eth_device_name, unsigned char *priority); This function gets the eth port priority. Please refer to Section 3.5.5.7. Returns 0 on success or the following error codes in the event of an error: Name Error Code

Returns 0 on success or the following error codes in the event of an error: Name Error Code

Returns 0 on success or the following error codes in the event of an error: Name Error Code

Returns 0 on success or the following error codes in the event of an error: Name Error Code

Declaration: apoe_err apoe_get_all_port_data(struct apoe_eth_device_mapping_hdr *apoe_eth_device_mapping); This function gets all port data. The function uses the apoe_get_eth_port_data API to get the status of each port. This global variable should be used as an input which is in libapoe.h. Do not modify this variable manually, as it is maintained by the API. struct apoe_eth_device_mapping_hdr apoe_eth_device_mapping[MAXIMUM_POE_PORT_NUMBER]; struct apoe_eth_device_mapping_hdr{ char eth_name[30]; unsigned char pcie_bus_dev_fun[3]; unsigned char poe_control_type; /* UART/I2C */ unsigned char poe_control_chip_type; char uart_name[30]; unsigned char poe_logic_port_number; unsigned char poe_enable; unsigned char poe_device_address; unsigned int subsystem_vendor_id; unsigned int subsystem_device_id; struct apoe_uart_info_hdr *uart_info; struct apoe_port_poe_data_hdr port_poe_data;

Returns 0 on success or the following error codes in the event of an error: Name Error Code

Declaration: apoe_err apoe_get_total_power(char *eth_device_name, unsigned int *power_consumption, unsigned int *calculated_power, unsigned int *available_power, unsigned int *power_limit, unsigned char *power_bank); This function gets the total power. The parameters power_consumption, calculated_power, available_ower, and power_limit are measured in Watts. Power_bank refers to the number of power banks. This is only available for the PD69200. Returns 0 on success or the following error codes in the event of an error:Advantech Copyright 2024. All rights reserved. Page 43 Name Error Code

Declaration: apoe_err apoe_set_power_banks(char *eth_device_name, unsigned char bank, unsigned int power_limit, unsigned int max_shutdown_voltage, unsigned int min_shutdown_voltage, unsigned char guard_bank, unsigned char *chip_type); This function sets the number of power banks. Bank: 0x00 ~ 0x0F, 0x80 ~ 0x8F (this is only available for the PD69200) power_limit: (W) max_shutdown_voltage: 0.1 (V) min_shutdown_voltage: 0.1 (V) Guard_bank: #define NO_GUARD_BANK 0x00 #define DYNAMIC_GUARD_BANK 0x01 #define NO_GUARD_BANK_CHANGE 0xFF Chip_type reports what PoE controller is currently being used. Returns 0 on success or the following error codes in the event of an error: Name Error Code

Declaration: apoe_err apoe_get_power_supply_parameters(char *eth_device_name, unsigned int *power_consumption, unsigned int *max_shutdown_voltage, unsigned int *min_shutdown_voltage, unsigned char *power_bank, unsigned int *power_limit, unsigned char *chip_type); This function gets the power supply parameters. power_consumption: (W) max_shutdown_voltage: 0.1 (V) min_shutdown_voltage: 0.1 (V) power_bank: current active power bank power_limit: (W) Chip_type reports what PoE controller is currently being used. Returns 0 on success or the following error codes in the event of an error:Advantech Copyright 2024. All rights reserved. Page 45 Name Error Code

Declaration: apoe_err apoe_get_power_supply_voltage_current(char *eth_device_name, unsigned int *vmain_voltage, unsigned int *imain_current); This function gets the power supply voltage current. vmain_voltage: 0.1 (V) imain_current: (mA) Returns 0 on success or the following error codes in the event of an error: Name Error Code

Declaration: apoe_err apoe_set_power_bank_power_source_type(char *eth_device_name, unsigned char bank, unsigned char source_type); This function sets the power bank power source type (this is only available for the PD69200) Bank: (0x00 ~ 0x0F) Source_type: (0x03) reserved, (0x02) backup source, (0x01) primary source, (0x00) unknown. Returns 0 on success or the following error codes in the event of an error: Name Error Code

-102Advantech Copyright 2024. All rights reserved. Page 46

3.5.7 APOE Register Read/Write Debug Functions

3.5.7.1 apoe_err apoe_get_register_value()

Declaration: apoe_err apoe_get_register_value(char *eth_device_name, unsigned char chip_id, unsigned char addr, unsigned char *data); This function gets the register value from the controller. Chip_id is the chip HW ID (platform-dependent). Addr is the register address, *data is the value of the register address. This API is only available for the PD69104. Returns 0 on success or return the following error codes in the event of an error. Name Error Code

Declaration: apoe_err apoe_set_register_value(char *eth_device_name, unsigned char chip_id, unsigned char addr, unsigned char data); This function sets the register value. This API is only available for the PD69104. Chip_id is the chip HW ID (platform-dependent). Addr is the register address. data is the register address value. Returns 0 on success or return the following error codes in the event of an error. Name Error Code

-102Advantech Copyright 2024. All rights reserved. Page 47

Declaration: apoe_err apoe_clear_interrupt(char *eth_device_name); This function clears the interrupt pin and all event registers of the controller (only available for the PD69104) Returns 0 on success or the following error codes in the event of an error: Name Error Code

Declaration: apoe_set_interrupt_setting(char *eth_device_name, unsigned char enable, unsigned char parameters); This function sets the interrupt pin enable/disable status (only available for the PD69104). Parameters refers to an interrupt event. Please refer to the following definitions to set parameters. For example, if you need to enable the interrupt for disconnent and overcurrent event please set parameters to (INT_DISCONNECT| INT_OVER_CURRENT). #define INT_DISCONNECT 1<<2 #define INT_CLASS 1<<4 #define INT_OVER_CURRENT 3<<5 #define INT_SUPPLY_FAILED 1<<7 Returns 0 on success or the following error codes in the event of an error: Name Error CodeAdvantech Copyright 2024. All rights reserved. Page 48

Declaration: apoe_err apoe_get_interrupt_setting(char *eth_device_name, unsigned char *enable, unsigned char *parameters); This function gets the interrupt pin enable/disable status and interrupt event settings of the controller (this is only available for the PD69104). Please refer to Section 3.5.8.2 for the definition of parameters. Returns 0 on success or the following error codes in the event of an error: Name Error Code

APOECU is a sample Linux command line utility that uses the libapoecu library. Basically, all functions of the libapoe API library can be invoked through this utility. The intended use case is for debugging/manufacturing purposes. The utility can also be used in scripts, rather than requiring full integration of the libapoe library into applications. The PoE eth device name must be specified in almost every command of APOECU. If the eth device name is unknown, then the -GAPD command must be used first. This command will detect and show all PoE eth devices with their PoE status. APOECU can also run in parallel(multi-process). It contains mutex mechanism to make sure the communications can be done successfully from different processes.

When APOECU is started without any parameters having been set, the following usage information will be displayed for reference: [root@localhost ~]# ./apoecu Usage: apoecu [op] <interface> <interface>: ethdev name, or for switch port 2, please use switch_2 as device name. [op]: The operation you want to do. -V: Get libapoe and apoecu version. -VF: Get PoE MCU FW version -VP Get Protocol version between libapoe and PoE MCU -SEPED Set eth port enable/disable and port type -SEPFP Set eth port force power -SEPP Set eth port priority -SEPPL Set eth port power limit. -GEPD Get eth port data, this command will provide the info about -GEPPL, -GEPP, -GEPS, - GEPES, -GEPM and -GDS -GEPPL Get eth port power limit -GEPP Get eth port priority -GEPS Get eth port status -GEPES Get eth port extend status -GEPM Get eth port measurements -GAPD Get all PoE enabled port data -GTP Get total power -SPB Set power banks -GPB Get power banksAdvantech Copyright 2024. All rights reserved. Page 50 -GPSP Get power supply parameters -GPSVC Get power supply voltage current -SEPINT: Set eth port enable/disable PoE intterupt signal -GEPINT: Get eth port PoE intterupt signal settings -CLRINT: Clear interrupt pin and all event registers -CHKINT: Check interrupt status of each port -GRV: Get register value (platform specific) -SRV: Set register value (platform specific) [root@localhost ~]#

Set the eth port force power (cf. Section 3.5.5.4): Note: To set FORCE to a PoE port, this command must be called with FORCE every time after a PoE device is connected to the PoE port. [root@localhost ~]# ./apoecu -SEPFP Example: Set eth port force power. So use -SEPFP eth_3 FORCE will set eth_3 to force connect Command: Set eth port force power. Declaration: SEPFP <eth device name> <FORCE/NORMAL> Output: NA Error: APOE_ERR_PARAM_OUT_OF_BOUND (0x93) Example Set the eth port eth_poe_0 force power to ON: [root@localhost ~]# ./apoecu -SEPFP eth_poe_0 FORCE set_eth_port_force_power eth_poe_0 set to FORCE

Set the eth port power limit (cf. Section 3.5.5.5): [root@localhost ~]# ./apoecu -SEPPL Example: Set eth port power limit. So use -SEPPL eth_3 25000 will set eth_3 power limit to 25W NOTE: This chip only supports W not mW, so please enter the number which is multiple of

Get the total power (cf. Section 3.5.6.2): [root@localhost ~]# ./apoecu -GTP Example: Get total power. So use -GTP eth_3 will get system total power control eth_3 Command: Get total power. Declaration: GTP <eth device name> Output: Total power consumption (mW) Total calculated power (mW) Available power (mW) Power limit (mW) Power bank Error: APOE_ERR_PARAM_OUT_OF_BOUND (0x93) Example Get the total power of eth port eth_poe_0: [root@localhost ~]# ./apoecu -GTP eth_poe_0 get_total_power System power information that control eth_poe_0 Total power consumption (I*Vmain): 11 (W) Calculated power (Based on power management method): 11 (W) Available power: 49 (W) Power limit: 60 (W) Power bank: 0x00

Max shutdown voltage should be entered NA for this PoE device. Min shutdown voltage should be entered in 0~380000mV for this device. Min shutdown voltage is set with step 0.186V in chip, so the value from -GPB or -GPSP could be not the same as user input Error: APOE_ERR_PARAM_OUT_OF_BOUND (0x93) Example Set eth_poe_0 power bank to 0x00, set the power limit to 60 W, and set the min shutdown voltage to 44000 mV: [root@localhost ~]# ./apoecu -SPB eth_poe_0 0x00 60 NA 44000 NO_GUARD_BANK set_power_banks eth_poe_0 power bank 0x00 set power limit to 60 (W), min shutdown voltage to 44000 (mV) guard band is not supported. Min shutdown voltage is set with step 0.186V in chip, so the value from -GPB or -GPSP could be not the same as user input

Get the power bank information (cf. Section 3.5.6.4): [root@localhost ~]# ./apoecu -GPB Example: Get power banks. So use -GPB eth_3 0x00 will get power bank 0's information which control eth_3 Command: Get power banks. Declaration: GPB <eth device name> <bank id 0x00 ~ 0x0f, 0x80 ~ 0x8f> Output: Power limit (W) Max shutdown voltage (mV) Min shutdown voltage (mV)Advantech Copyright 2024. All rights reserved. Page 60 Guard bank Source type Max shutdown voltage/Guard bank/Source type is NA for this PoE device. Min shutdown voltage is set with step 0.186V in chip, so the value from -GPB or -GPSP could be not the same as user input Error: APOE_ERR_PARAM_OUT_OF_BOUND (0x93) Example Use –GPB eth_poe_0 0x00 will get information on Power Bank 0: [root@localhost ~]# ./apoecu -GPB eth_poe_0 0x00 get_power_banks Power limit: 60 (W) Min shutdown voltage 44000 (mV) Min shutdown voltage is set with step 0.186V in chip, so the value from -GPB or -GPSP could be not the same as user input

Clear the interrupt signal and all event registers of a controller (cf. Section 3.5.8.1): [root@localhost ~]# ./apoecu -CLRINT Example: Clear interrupt pin and all event registers of controller. So use -CLRINT eth_3 will clear interrupt pin and all event registers of controller. Command: Clear interrupt pin and all event registers of controller. Declaration: CLRINT <eth device name> Output: N/A Error: APOE_ERR_PARAM_OUT_OF_BOUND (0x93) Example Use -CLRINT eth_poe_0 to clear the eth port eth_poe_0 interrupt: [root@localhost ~]# ./apoecu -CLRINT eth_poe_0 clr_interrupt clear eth_poe_0 interrupt pin and all event registers

5.1 Connecting a PoE port to a Normal NIC port.

When a PoE port is connected to a normal NIC port, the port status will be 0x43 or 0x41, meaning that the resistance of the signature is too low or a short circuit has occurred. The output is shown in the following figure: [root@ localhost ~]# ./apoecu -GEPD eth_poe_0 get_eth_port_data eth_poe_0 data: power limit: 30000 (mW) temp power limit: 30000 (mW) priority: LOW (0x03) Enable? yes Status: (0x01) Result of last detection: Short Result of last classification: Class 1 Force power enable: no Class number: 0 Operation mode: AT System Vmain: 47100 (mV) Port calculated current: 0 (mA) Port power: 0 (mW) Port voltage: 0 (mV) Temperature: 47 (degree Celsius)

5.2 PoE Interrupt with FWA-3260

The following text shows how to use an interrupt signal with the FWA-3260, which has an I2C to GPIO device connected to the interrupt pin of a PoE device. The I2C to GPIO device can be read to get the interrupt status.

5.2.1 Using kernel driver to control i2c-mux and i2c to gpio device.

Use “apoecu -SEPINT” command to enable interrupt command of PoE device. [root@localhost ~]# ./apoecu -GAPD get_all_port_data ======================================== Eth port name: b05d00f3 power limit: 30000 (mW) temp power limit: 30000 (mW) priority: LOW (0x03) Enable? yes Status: (0x06) Result of last detection: Open circuit Result of last classification: Class 0 Force power enable: no Class number: 0 Operation mode: AT System Vmain: 54200 (mV) Port calculated current: 0 (mA) Port power: 0 (mW) Port voltage: 0 (mV) Temperature: 44 (degree Celsius) ======================================== Eth port name: b05d00f2 power limit: 30000 (mW) temp power limit: 30000 (mW) priority: LOW (0x03) Enable? yes Status: (0x06) Result of last detection: Open circuit Result of last classification: Class 0 Force power enable: no Class number: 0Advantech Copyright 2024. All rights reserved. Page 68 Operation mode: AT System Vmain: 54200 (mV) Port calculated current: 0 (mA) Port power: 0 (mW) Port voltage: 0 (mV) Temperature: 44 (degree Celsius) ======================================== Eth port name: b05d00f1 power limit: 30000 (mW) temp power limit: 30000 (mW) priority: LOW (0x03) Enable? yes Status: (0x06) Result of last detection: Open circuit Result of last classification: Class 0 Force power enable: no Class number: 0 Operation mode: AT System Vmain: 54200 (mV) Port calculated current: 0 (mA) Port power: 0 (mW) Port voltage: 600 (mV) Temperature: 44 (degree Celsius) ======================================== Eth port name: eth0_1 power limit: 36000 (mW) temp power limit: 36000 (mW) priority: LOW (0x03) Enable? yes Status: (0x44) Result of last detection: Good Result of last classification: Class 4Advantech Copyright 2024. All rights reserved. Page 69 Force power enable: no Class number: 4 Operation mode: AT System Vmain: 54200 (mV) Port calculated current: 218 (mA) Port power: 11000 (mW) Port voltage 54500 (mV) Temperature: 44 (degree Celsius) [root@localhost ~]# ./apoecu -SEPINT eth0_1 ENABLE ENABLE ENABLE ENABLE ENABLE set_interrupt eth_port interrupt ENABLE discoonect interrupt: ENABLE class interrupt: ENABLE over current interrupt: ENABLE supply failure int: ENABLE

5.2.3 Read the status of i2c to GPIO device

Use sysfs to get the i2c to gpio device pin status. Notice that the pin stays high(1) when no interrupt happened. The pin will be low(0) when interrupt happened. [root@localhost ~]# cat /sys/class/gpio/gpio428/value

Users can connect or disconnect the PoE end device to the PoE port which has the interrupt function enabled. Connection or disconnection can trigger an interrupt. Read the status again and if you see 0 it means the interrupt has occured. [root@localhost ~]# cat /sys/class/gpio/gpio428/value

After the interrupt happened, the user needs to clear the interrupt manually. This could be done by using “apoecu -CLRINT” command as the following figure shows. [root@localhost ~]# ./apoecu -CLRINT eth0_1 clr_interrupt clear eth0_1 interrupt pin and all event registers Advantech also provides user space sample code which can monitor the GPIO status from pca9554 in user space. You can use: #./gpio_int 428Advantech Copyright 2024. All rights reserved. Page 70 to monitor the PoE interrupt status. In some specific platforms, we connect the interrupt from pca9554 to smbus alert pin.

This scenario can trigger the smbus alert interrupt to the CPU. Advantech also provides the sample code to modify the smbus driver that can send netlink messsages when interrupts happen. And we also provide user space sample code which can receive the netlink message from the smbus driver. Customers can modify these sample codes to do what they want to do when interrupts happen. The work flow of sample code is:

2. Build modified i801 driver

Eth0 is the poe port.

poe_int_chk is an monitor program and it will detect the interrupt and clear the interrupt from PoE controller. If an interrupt happens, you will see: command: ./apoecu -CLRINT eth2 clr_interrupt clear eth2 interrupt pin and all event registers 0 Received message payload: 1040|POE INT 1 Received message payload: 1040|POE INT

5.3 PoE Interrupt with FWA-1012VC

The following text gives an example of how to use the interrupt signal with the FWA-1012VC, which uses Denverton’s GPIO pin connected to the interrupt pin of a PoE device. The GPIO pin can be read using the APOECU API/command (cf. Section 3.5.5.3) to get the interrupt status.

5.3.1 Enable PoE Interrupt Function

Use the “apoecu -SEPINT” command to enable the interrupt command of a PoE device. [root@localhost ~]# ./apoecu -SEPINT eth_poe_0 ENABLE ENABLE ENABLE ENABLE ENABLE set_interrupt eth_port interrupt: ENABLE discoonect interrupt: ENABLE PD69104B Smbus controller PCA9554 Int from PD69104B Int from PCA9554Advantech Copyright 2024. All rights reserved. Page 71 class interrupt: ENABLE over current interrupt: ENABLE supply failure int: ENABLE

Users can connect or disconnect the PoE end device to the PoE port which the interrupt function has been enabled. Connection or disconnection can trigger an interrupt. Read the status again and you can see “level: 0” which means the interrupt happened. [root@localhost ~]# cat /sys/class/gpio/gpio420/value

After the interrupt, the user needs to clear the interrupt manually. This could be done by using “apoecu -CLRINT” command as the following figure shows. [root@localhost ~]# ./apoecu -CLRINT eth_poe_0 clr_interrupt clear eth_poe_0 interrupt pin and all event registers Advantech also provides a user space sample code gpio_int.c which can monitor the GPIO status in user space. You can use #./gpio_int 420 to monitor the PoE interrupt status.

5.4 Setting and Testing the Priority of Different Ports

Scenario: Power bank: 40W PoE Port 1: high priority PoE Port 2: low priority Commands: ./apoecu -SEPP <poe_eth_port1> HIGH ./apoecu -SEPP <poe_eth_port2> LOW ./apoecu -SPB <poe_eth_port1> 0x00 40 57000 44000 NO_GUARD_BANKAdvantech Copyright 2024. All rights reserved. Page 72 Test: Connect a 30 W power device (PD) to Port 2, connect a 30 W PD to Port 1, and then check the LED of Port 2. The LED of Port 2 should be blinking.

Manual assistant
Powered by ChatGPT
Waiting for your message
Product information

Brand : Advantech

Model : FWA1012VC

Category : Stroller