General_ConfigurationGENERAL_API

General configuration commands.

Data Structures

struct sl_wfx_capabilities_t
Capabilities offered by the WLAN used in command sl_wfx_startup_ind_body_t .
struct sl_wfx_otp_regul_sel_mode_info_t
REGUL_SEL_MODE OTP field reported in command sl_wfx_startup_ind_body_t .
struct sl_wfx_otp_phy_info_t
OTP_PHY_INFO OTP field reported in command sl_wfx_startup_ind_body_t .
struct sl_wfx_startup_ind_body_t
Startup Indication message.
struct sl_wfx_configuration_req_body_t
Configure the device.
struct sl_wfx_configuration_cnf_body_t
Confirmation message of CONFIGURATION command sl_wfx_configuration_req_body_t .
struct sl_wfx_control_gpio_req_body_t
Send a request to read or write a GPIO identified by its label (that is defined in the PDS)
struct sl_wfx_control_gpio_cnf_body_t
Confirmation from request to read and write a GPIO.
struct sl_wfx_rx_stats_t
RX stats from the GENERIC indication message sl_wfx_generic_ind_body_t .
struct sl_wfx_generic_ind_body_t
the Generic indication message.
struct sl_wfx_exception_ind_body_t
Exception indication message.
struct sl_wfx_error_ind_body_t
Error indication message.

Typedefs

typedef sl_wfx_header_t sl_wfx_wakeup_ind_t
Wake-up indication message.
typedef sl_wfx_header_t sl_wfx_shut_down_req_t
SHUT_DOWN command.

Enumerations

enum sl_wfx_fw_type_t {
SL_WFX_FW_TYPE_ETF = 0x0,
SL_WFX_FW_TYPE_WFM = 0x1,
SL_WFX_FW_TYPE_WSM = 0x2
}
enum sl_wfx_gpio_mode_t {
SL_WFX_GPIO_MODE_D0 = 0x0,
SL_WFX_GPIO_MODE_D1 = 0x1,
SL_WFX_GPIO_MODE_OD0 = 0x2,
SL_WFX_GPIO_MODE_OD1 = 0x3,
SL_WFX_GPIO_MODE_TRISTATE = 0x4,
SL_WFX_GPIO_MODE_TOGGLE = 0x5,
SL_WFX_GPIO_MODE_READ = 0x6
}
Configure GPIO mode.
enum sl_wfx_gpio_error_t {
SL_WFX_GPIO_ERROR_0 = 0x0,
SL_WFX_GPIO_ERROR_1 = 0x1,
SL_WFX_GPIO_ERROR_2 = 0x2
}
detailed error cause returned by CONTROL_GPIO confirmation message sl_wfx_control_gpio_cnf_body_t
enum sl_wfx_generic_indication_type_t {
SL_WFX_GENERIC_INDICATION_TYPE_RAW = 0x0,
SL_WFX_GENERIC_INDICATION_TYPE_STRING = 0x1,
SL_WFX_GENERIC_INDICATION_TYPE_RX_STATS = 0x2
}
specifies the type of data reported by the indication message sl_wfx_generic_ind_body_t
enum sl_wfx_error_t {
WSM_SL_WFX_ERROR_FIRMWARE_ROLLBACK = 0x0,
WSM_SL_WFX_ERROR_FIRMWARE_DEBUG_ENABLED = 0x1,
WSM_SL_WFX_ERROR_OUTDATED_SESSION_KEY = 0x2,
WSM_SL_WFX_ERROR_INVALID_SESSION_KEY = 0x3,
WSM_SL_WFX_ERROR_OOR_VOLTAGE = 0x4,
WSM_SL_WFX_ERROR_PDS_VERSION = 0x5,
WSM_SL_ERROR_OOR_TEMPERATURE = 0x6,
WSM_SL_ERROR_REQ_DURING_KEY_EXCHANGE = 0x7,
WSM_SL_ERROR_MULTI_TX_CNF_SECURELINK = 0x8,
WSM_SL_ERROR_SECURELINK_OVERFLOW = 0x9,
WSM_SL_ERROR_SECURELINK_DECRYPTION = 0xa
}
specifies the type of error reported by the indication message sl_wfx_error_ind_body_t

Detailed Description

General configuration commands.


Data Structure Documentation

sl_wfx_capabilities_t

struct sl_wfx_capabilities_t

Capabilities offered by the WLAN used in command sl_wfx_startup_ind_body_t .

Definition at line 265 of file wfm_general_api.h .

Data Fields
uint8_t linkmode: 2 Bit 0-1 : OTP SecureLink mode. 0=reserved, 1=untrusted (no secure link supported), 2=evaluation mode (no key burnt), 3=active.
uint8_t reserved1: 6 Bit 2-7 : Reserved.
uint8_t reserved2 Bit 8-15 : Reserved.
uint8_t reserved3 Bit 16-23 : Reserved.
uint8_t reserved4 Bit 24-31 : Reserved.

sl_wfx_otp_regul_sel_mode_info_t

struct sl_wfx_otp_regul_sel_mode_info_t

REGUL_SEL_MODE OTP field reported in command sl_wfx_startup_ind_body_t .

Definition at line 276 of file wfm_general_api.h .

Data Fields
uint8_t region_sel_mode: 4 Bit 0-3 : indicates default FW behavior regarding DFS region setting 0=Unrestricted, 1=SuperGlobal (enforces FCC, CE and Japan regulations depending on the automatic region detection) 2=SingleRegion (enforces FCC, CE or Japan depending on OTP tables content), 3=Reserved.
uint8_t reserved: 4 Bit 4-7 : Reserved.

sl_wfx_otp_phy_info_t

struct sl_wfx_otp_phy_info_t

OTP_PHY_INFO OTP field reported in command sl_wfx_startup_ind_body_t .

Definition at line 286 of file wfm_general_api.h .

Data Fields
uint8_t otp_phy_ver: 2 Bit 6-7 : Revision of OTP info.
uint8_t phy0_region: 3 Bit 3-5 : DFS region corresponding to backoff vs. channel group table indexed 0.
uint8_t phy1_region: 3 Bit 0-2 : DFS region corresponding to backoff vs. channel group table indexed 1.

sl_wfx_startup_ind_body_t

struct sl_wfx_startup_ind_body_t

Startup Indication message.

This is the first message sent to the host to confirm boot success. It gives detailed information on the HW and FW versions and capabilities

Definition at line 301 of file wfm_general_api.h .

Data Fields
uint8_t api_version_major
uint8_t api_version_minor
sl_wfx_capabilities_t capabilities List some FW options.
uint8_t disabled_channel_list[2] =OTP Disabled channel list info
uint8_t firmware_build
uint8_t firmware_label[128] Null terminated text string describing the loaded FW.
uint8_t firmware_major
uint8_t firmware_minor
uint8_t firmware_type See enum sl_wfx_fw_type_t.
uint16_t hardware_id =RO misc_read_reg7 register value
uint8_t mac_addr[2][6] MAC addresses derived from OTP.
uint16_t num_inp_ch_bufs Number of buffers available for request messages.
uint8_t num_interfaces number of interfaces (WIFI link : STA or AP) that can be created by the user
uint8_t num_links_aP number of STA that are supported in AP mode
uint8_t opn[14] =OTP part_OPN
sl_wfx_otp_phy_info_t otp_phy_info info on OTP backoff tables used to enforce the different DFS regulations.
sl_wfx_otp_regul_sel_mode_info_t regul_sel_mode_info OTP region selection mode info.
uint16_t size_inp_ch_buf TX Buffer size in bytes=request message max size.
uint32_t status Initialization status. A value of zero indicates the boot is completed successfully (see enum sl_wfx_status_t)
uint32_t supported_rate_mask A bit mask that indicates which rates are supported by the Physical layer. See enum api_rate_index.
uint8_t uid[8] =OTP UID

sl_wfx_configuration_req_body_t

struct sl_wfx_configuration_req_body_t

Configure the device.

It sends a PDS compressed file that configures the device regarding board dependent parameters. The PDS compressed file must fit in a command buffer and have less than 256 elements.

Definition at line 347 of file wfm_general_api.h .

Data Fields
uint16_t length pds_data length in bytes
uint8_t pds_data[] variable size PDS data byte array

sl_wfx_configuration_cnf_body_t

struct sl_wfx_configuration_cnf_body_t

Confirmation message of CONFIGURATION command sl_wfx_configuration_req_body_t .

Definition at line 359 of file wfm_general_api.h .

Data Fields
uint32_t status Configuration status. A value of zero indicates the boot is completed successfully (see enum sl_wfx_status_t)

sl_wfx_control_gpio_req_body_t

struct sl_wfx_control_gpio_req_body_t

Send a request to read or write a GPIO identified by its label (that is defined in the PDS)

After a write it also read back the value to check there is no drive conflict

Definition at line 385 of file wfm_general_api.h .

Data Fields
uint8_t gpio_label Identify the GPIO by its label (defined in the PDS)
uint8_t gpio_mode define how to set or read the GPIO (see enum sl_wfx_gpio_mode_t)

sl_wfx_control_gpio_cnf_body_t

struct sl_wfx_control_gpio_cnf_body_t

Confirmation from request to read and write a GPIO.

Definition at line 406 of file wfm_general_api.h .

Data Fields
uint32_t status enum sl_wfx_status_t : a value of zero indicates the request is completed successfully.
uint32_t value the error detail (see enum sl_wfx_gpio_error_t) when sl_wfx_control_gpio_cnf_body_t::status reports an error else the gpio read value.

sl_wfx_rx_stats_t

struct sl_wfx_rx_stats_t

RX stats from the GENERIC indication message sl_wfx_generic_ind_body_t .

Definition at line 436 of file wfm_general_api.h .

Data Fields
int16_t cfo[SL_WFX_RATE_NUM_ENTRIES] CFO in k_hz by frame rate.
uint32_t date This message transmission date in firmware timebase (microsecond)
uint8_t is_ext_pwr_clk Indicate if the low power clock is external.
uint32_t nb_crc_frame Number of frame received with bad CRC.
uint32_t nb_rx_by_rate[SL_WFX_RATE_NUM_ENTRIES] Number of frame received by rate.
uint32_t nb_rx_frame Total number of frame received.
uint16_t per[SL_WFX_RATE_NUM_ENTRIES] PER*10000 by frame rate.
uint32_t per_total PER on the total number of frame.
uint32_t pwr_clk_freq Frequency of the low power clock in Hz.
int16_t rssi[SL_WFX_RATE_NUM_ENTRIES] RSSI in Dbm*100 by frame rate.
int16_t snr[SL_WFX_RATE_NUM_ENTRIES] SNR in Db*100 by frame rate.
uint32_t throughput Throughput calculated on correct frames received.

sl_wfx_generic_ind_body_t

struct sl_wfx_generic_ind_body_t

the Generic indication message.

It reports different type of information that can be printed by the driver.

Definition at line 461 of file wfm_general_api.h .

Data Fields
sl_wfx_indication_data_t indication_data Indication data.
uint32_t indication_type Identify the indication data (see enum type sl_wfx_generic_indication_type_t)

sl_wfx_exception_ind_body_t

struct sl_wfx_exception_ind_body_t

Exception indication message.

It reports unexpected errors. A reboot is needed after this message.

Definition at line 477 of file wfm_general_api.h .

Data Fields
uint8_t data[124] Raw data array.

sl_wfx_error_ind_body_t

struct sl_wfx_error_ind_body_t

Error indication message.

It reports user configuration errors. A reboot is needed after this message.

Definition at line 510 of file wfm_general_api.h .

Data Fields
uint8_t data[] Generic data buffer - contents depends on the error type.
uint32_t type error type, see enum sl_wfx_error_t

Typedef Documentation

sl_wfx_shut_down_req_t

SHUT_DOWN command.

A hardware reset and complete reboot is required to resume from that state. There is no confirmation to this command. It is effective when WUP register bit and WUP pin (when used) are both to 0.

Definition at line 421 of file wfm_general_api.h .

sl_wfx_wakeup_ind_t

Wake-up indication message.

Since
API1.4.0

Its body is empty. It signals that the chip is awake and ready to receive commands after a wake-up request from the host. It generates a DATA_IRQ to the host driver when ready. It can be replaced or passed by another message that would have appeared concurrently like a Rx frame.

Definition at line 339 of file wfm_general_api.h .

Enumeration Type Documentation

sl_wfx_error_t

specifies the type of error reported by the indication message sl_wfx_error_ind_body_t

Enumerator
WSM_SL_WFX_ERROR_FIRMWARE_ROLLBACK

Firmware rollback error, no data returned.

WSM_SL_WFX_ERROR_FIRMWARE_DEBUG_ENABLED

Firmware debug feature enabled, no data returned.

WSM_SL_WFX_ERROR_OUTDATED_SESSION_KEY

SecureLink Session key is outdated, 4 bytes returned (nonce counter)

WSM_SL_WFX_ERROR_INVALID_SESSION_KEY

SecureLink Session key is invalid, 0 or 4 bytes returned.

WSM_SL_WFX_ERROR_OOR_VOLTAGE

Out-of-range power supply voltage detected, no data returned.

WSM_SL_WFX_ERROR_PDS_VERSION

Wrong PDS version detected, no data returned.

WSM_SL_ERROR_OOR_TEMPERATURE

Out-of-range temperature, no data returned.

WSM_SL_ERROR_REQ_DURING_KEY_EXCHANGE

Requets from Host are forbidden until the end of key exchange (Host should wait for the associated indication)

WSM_SL_ERROR_MULTI_TX_CNF_SECURELINK

'Multi TX conf' feature is not supported in SecureLink mode

WSM_SL_ERROR_SECURELINK_OVERFLOW

HT SecureLink traffic is producing an internal overflow.

WSM_SL_ERROR_SECURELINK_DECRYPTION

An error occured during message decryption (can be a counter mismatch or wrong CCM tag)

Definition at line 490 of file wfm_general_api.h .

sl_wfx_fw_type_t

Enumerator
SL_WFX_FW_TYPE_ETF

Test Firmware.

SL_WFX_FW_TYPE_WFM

WLAN Full MAC (WFM)

SL_WFX_FW_TYPE_WSM

WLAN Split MAC (WSM)

Definition at line 256 of file wfm_general_api.h .

sl_wfx_generic_indication_type_t

specifies the type of data reported by the indication message sl_wfx_generic_ind_body_t

Enumerator
SL_WFX_GENERIC_INDICATION_TYPE_RAW

Byte stream type, currently not used.

SL_WFX_GENERIC_INDICATION_TYPE_STRING

NULL terminating String.

SL_WFX_GENERIC_INDICATION_TYPE_RX_STATS

Rx statistics structure.

Definition at line 427 of file wfm_general_api.h .

sl_wfx_gpio_error_t

detailed error cause returned by CONTROL_GPIO confirmation message sl_wfx_control_gpio_cnf_body_t

Enumerator
SL_WFX_GPIO_ERROR_0

Undefined GPIO_ID.

SL_WFX_GPIO_ERROR_1

GPIO_ID not configured in GPIO mode (gpio_enabled =0)

SL_WFX_GPIO_ERROR_2

Toggle not possible while in tristate.

Definition at line 398 of file wfm_general_api.h .

sl_wfx_gpio_mode_t

Configure GPIO mode.

Used in sl_wfx_control_gpio_req_body_t

Enumerator
SL_WFX_GPIO_MODE_D0

Configure the GPIO to drive 0.

SL_WFX_GPIO_MODE_D1

Configure the GPIO to drive 1.

SL_WFX_GPIO_MODE_OD0

Configure the GPIO to open drain with pull_down to 0.

SL_WFX_GPIO_MODE_OD1

Configure the GPIO to open drain with pull_up to 1.

SL_WFX_GPIO_MODE_TRISTATE

Configure the GPIO to tristate.

SL_WFX_GPIO_MODE_TOGGLE

Toggle the GPIO output value : switches between D0 and D1 or between OD0 and OD1.

SL_WFX_GPIO_MODE_READ

Read the level at the GPIO pin.

Definition at line 371 of file wfm_general_api.h .