XCORE SDK
XCORE Software Development Kit
Functions
GENERAL_DRIVER_API

Functions

sl_status_t sl_wfx_send_configuration (const char *pds_data, uint32_t pds_data_length)
 Function to send PDS chunks. More...
 
sl_status_t sl_wfx_control_gpio (uint8_t gpio_label, uint8_t gpio_mode, uint32_t *value)
 Send a request to read or write a GPIO. More...
 
sl_status_t sl_wfx_pta_settings (uint8_t pta_mode, uint8_t request_signal_active_level, uint8_t priority_signal_active_level, uint8_t freq_signal_active_level, uint8_t grant_signal_active_level, uint8_t coex_type, uint8_t default_grant_state, uint8_t simultaneous_rx_access, uint8_t priority_sampling_time, uint8_t tx_rx_sampling_time, uint8_t freq_sampling_time, uint8_t grant_valid_time, uint8_t fem_control_time, uint8_t first_slot_time, uint16_t periodic_tx_rx_sampling_time, uint16_t coex_quota, uint16_t wlan_quota)
 Send a request to set the PTA mode, the active levels on signals, the Coex type, to define the timings, quotas, combined mode and default grant state. More...
 
sl_status_t sl_wfx_pta_priority (uint32_t priority)
 Send a request to define the level of priority used to arbitrate concurrent Coex and Wlan requests. More...
 
sl_status_t sl_wfx_pta_state (uint32_t pta_state)
 Send a request to start or stop the PTA. More...
 
sl_status_t sl_wfx_set_cca_config (uint8_t cca_thr_mode)
 Send a request to configure the CCA mode. More...
 
sl_status_t sl_wfx_prevent_rollback (uint32_t magic_word)
 Prevent Rollback request. More...
 
sl_status_t sl_wfx_shutdown (void)
 Shutdown the Wi-Fi chip. More...
 

Detailed Description

Function Documentation

◆ sl_wfx_control_gpio()

sl_status_t sl_wfx_control_gpio ( uint8_t  gpio_label,
uint8_t  gpio_mode,
uint32_t *  value 
)

Send a request to read or write a GPIO.

Parameters
gpio_labelis the GPIO label to control (defined in the PDS)
gpio_modedefines how to read or set the GPIO
valuereturns the read value or the detailed error cause
Returns
SL_STATUS_OK if the request has been sent correctly, SL_STATUS_FAIL otherwise

◆ sl_wfx_prevent_rollback()

sl_status_t sl_wfx_prevent_rollback ( uint32_t  magic_word)

Prevent Rollback request.

Parameters
magic_wordUsed to prevent mistakenly sent request from burning the OTP
Returns
SL_STATUS_OK if the setting is applied correctly, SL_STATUS_FAIL otherwise

◆ sl_wfx_pta_priority()

sl_status_t sl_wfx_pta_priority ( uint32_t  priority)

Send a request to define the level of priority used to arbitrate concurrent Coex and Wlan requests.

Parameters
prioritydefines the priority levels for concurrent Coex and WLAN request arbitration
  • SL_WFX_PTA_PRIORITY_COEX_MAXIMIZED
  • SL_WFX_PTA_PRIORITY_COEX_HIGH
  • SL_WFX_PTA_PRIORITY_BALANCED
  • SL_WFX_PTA_PRIORITY_WLAN_HIGH
  • SL_WFX_PTA_PRIORITY_WLAN_MAXIMIZED
Returns
SL_STATUS_OK if the request has been sent correctly, SL_STATUS_FAIL otherwise

◆ sl_wfx_pta_settings()

sl_status_t sl_wfx_pta_settings ( uint8_t  pta_mode,
uint8_t  request_signal_active_level,
uint8_t  priority_signal_active_level,
uint8_t  freq_signal_active_level,
uint8_t  grant_signal_active_level,
uint8_t  coex_type,
uint8_t  default_grant_state,
uint8_t  simultaneous_rx_access,
uint8_t  priority_sampling_time,
uint8_t  tx_rx_sampling_time,
uint8_t  freq_sampling_time,
uint8_t  grant_valid_time,
uint8_t  fem_control_time,
uint8_t  first_slot_time,
uint16_t  periodic_tx_rx_sampling_time,
uint16_t  coex_quota,
uint16_t  wlan_quota 
)

Send a request to set the PTA mode, the active levels on signals, the Coex type, to define the timings, quotas, combined mode and default grant state.

Parameters
pta_modedefines the mode to use
  • SL_WFX_PTA_1W_WLAN_MASTER
  • SL_WFX_PTA_1W_COEX_MASTER
  • SL_WFX_PTA_2W
  • SL_WFX_PTA_3W
  • SL_WFX_PTA_4W
request_signal_active_levelis the active level on REQUEST signal (PTA_RF_ACT pin)
priority_signal_active_levelis the active level on PRIORITY signal (PTA_STATUS pin)
freq_signal_active_levelis the active level on FREQ signal (PTA_FREQ pin)
grant_signal_active_levelis the active level on GRANT signal (PTA_TX_CONF pin)
  • SL_WFX_SIGNAL_LOW
  • SL_WFX_SIGNAL_HIGH
coex_type
  • SL_WFX_COEX_TYPE_GENERIC
  • SL_WFX_COEX_TYPE_BLE
default_grant_stateis the state of the GRANT signal before arbitration at grant_valid_time
  • SL_WFX_NO_GRANT
  • SL_WFX_GRANT
simultaneous_rx_accessis a boolean to allow both Coex and Wlan to receive concurrently, also named combined mode
priority_sampling_timeis the time (in microseconds) from the Coex request to the sampling of the priority on PRIORITY signal (1 to 31)
tx_rx_sampling_timeis the time (in microseconds) from the Coex request to the sampling of the directionality on PRIORITY signal (priority_sampling_time to 63)
freq_sampling_timeis the time (in microseconds) from the Coex request to the sampling of freq-match information on FREQ signal (1 to 127)
grant_valid_timeis the time (in microseconds) from Coex request to the GRANT signal assertion (MAX(tx_rx_sampling_time, freq_sampling_time) to 255)
fem_control_timeis the time (in microseconds) from Coex request to the control of FEM (grant_valid_time to 255)
first_slot_timeis the time (in microseconds) from the Coex request to the beginning of reception or transmission (grant_valid_time to 255)
periodic_tx_rx_sampling_timeis the period (in microseconds) from first_slot_time of following samplings of the directionality on PRIORITY signal (1 to 1023)
coex_quotais the duration (in microseconds) for which RF is granted to Coex before it is moved to Wlan
wlan_quotais the duration (in microseconds) for which RF is granted to Wlan before it is moved to Coex
Returns
SL_STATUS_OK if the request has been sent correctly, SL_STATUS_FAIL otherwise

◆ sl_wfx_pta_state()

sl_status_t sl_wfx_pta_state ( uint32_t  pta_state)

Send a request to start or stop the PTA.

Parameters
pta_statedefines the requested state of the PTA
  • SL_WFX_PTA_OFF
  • SL_WFX_PTA_ON
Returns
SL_STATUS_OK if the request has been sent correctly, SL_STATUS_FAIL otherwise

◆ sl_wfx_send_configuration()

sl_status_t sl_wfx_send_configuration ( const char *  pds_data,
uint32_t  pds_data_length 
)

Function to send PDS chunks.

Parameters
pds_dataData to be sent in the compressed PDS format
pds_data_lengthSize of the data to be sent
Returns
SL_STATUS_OK if the configuration has been sent correctly, SL_STATUS_FAIL otherwise
Note
The PDS (Platform Data Set) file contains the WF200 settings

◆ sl_wfx_set_cca_config()

sl_status_t sl_wfx_set_cca_config ( uint8_t  cca_thr_mode)

Send a request to configure the CCA mode.

Parameters
cca_thr_modedefines the requested mode for CCA
  • SL_WFX_CCA_THR_MODE_RELATIVE
  • SL_WFX_CCA_THR_MODE_ABSOLUTE
Returns
SL_STATUS_OK if the request has been sent correctly, SL_STATUS_FAIL otherwise

◆ sl_wfx_shutdown()

sl_status_t sl_wfx_shutdown ( void  )

Shutdown the Wi-Fi chip.

Returns
SL_STATUS_OK if the Wi-Fi chip has been shutdown correctly, SL_STATUS_FAIL otherwise
Note
Send the shutdown command, clear the WUP bit and the GPIO WUP to enable the Wi-Fi chips to go to sleep