Core#
Functions#
Retrieves the saved thread-specific firmware status value.
Sets the Real Time Clock (RTC) of the module.
Retrieves the current time from the module's Real Time Clock (RTC).
Sends M4 specific commands to NWP to access shared resources such as flash, XTAL etc.
Sets different timeouts given by sl_si91x_timeout_type_t for the Si91x device.
Sets different module timeouts in a single call for the Si91X device.
Retrieves TA RAM log/dump via Si91x UART/UART2.
Allows the Network Processor (NWP) to write content to the common flash from M4.
Sends a command to read data from the NWP flash memory of the SI91x wireless device.
Retrieve the firmware version currently installed on the SiWx91x device.
Retrieve the firmware image size from the firmware image file.
Set configuration to NWP.
Function Documentation#
sl_si91x_get_saved_firmware_status#
static sl_status_t sl_si91x_get_saved_firmware_status (void )
Retrieves the saved thread-specific firmware status value.
N/A |
This function fetches the firmware status value that is specific to the current thread.
Returns
sl_status_t. See Status Codes and Additional Status Codes for details.
52
of file components/device/silabs/si91x/wireless/inc/sl_si91x_core_utilities.h
sl_si91x_set_rtc_timer#
sl_status_t sl_si91x_set_rtc_timer (const sl_si91x_module_rtc_time_t * timer)
Sets the Real Time Clock (RTC) of the module.
[in] | timer | Pointer to an sl_si91x_module_rtc_time_t structure that contains the RTC time to be set. |
This function sets the RTC time of the module using the provided sl_si91x_module_rtc_time_t structure. It is a blocking call, meaning it will wait until the operation is complete before returning.
Pre-conditions:
The sl_wifi_init() API must be called prior to this API.
The SL_SI91X_CUSTOM_FEAT_RTC_FROM_HOST bit must be enabled in the Custom Feature Bitmap during the sl_wifi_init() process.
Returns
sl_status_t. See Status Codes and Additional Status Codes for details.
Note
Ensure that the Real-Time Clock (RTC) timer is configured to enable SSL certificate validation.
306
of file components/device/silabs/si91x/wireless/inc/sl_si91x_driver.h
sl_si91x_get_rtc_timer#
sl_status_t sl_si91x_get_rtc_timer (sl_si91x_module_rtc_time_t * response)
Retrieves the current time from the module's Real Time Clock (RTC).
[out] | response | Pointer to an sl_si91x_module_rtc_time_t structure where the RTC's current time will be stored. |
This function fetches the current time from the module's RTC and stores it in the provided sl_si91x_module_rtc_time_t structure. It is a blocking call, meaning it will wait until the operation is complete before returning.
Pre-conditions:
The sl_si91x_set_rtc_timer() API must be called to set the RTC time before attempting to retrieve it.
The SL_SI91X_CUSTOM_FEAT_RTC_FROM_HOST bit must be enabled in the Custom Feature Bitmap during the sl_wifi_init() process to allow RTC time setting and retrieval from the host.
Returns
sl_status_t. See Status Codes and Additional Status Codes for details.
326
of file components/device/silabs/si91x/wireless/inc/sl_si91x_driver.h
sl_si91x_m4_ta_secure_handshake#
sl_status_t sl_si91x_m4_ta_secure_handshake (uint8_t sub_cmd_type, uint8_t input_len, const uint8_t * input_data, uint8_t output_len, const uint8_t * output_data)
Sends M4 specific commands to NWP to access shared resources such as flash, XTAL etc.
[in] | sub_cmd_type | Specifies the sub-command type for the secure handshake. |
[in] | input_len | Pointer to the input data that contains the information used during the secure handshake. |
[in] | input_data | Specifies the length of the input data. |
[in] | output_len | Specifies the length of the output data. |
[out] | output_data | Pointer to a buffer where the response data will be stored after the secure handshake process. |
This function sends M4 specific commands using the specified sub-command type and input data.
This is a blocking API.
In SoC mode, this API only sends commands from the M4 core to the TA core.
Pre-conditions:
sl_wifi_init should be called before this API.
Returns
sl_status_t. See Status Codes and Additional Status Codes for details.
Note
The
output_len
andoutput_data
parameters are currently unused and reserved for future use.This API is only applicable in SoC mode.
Currently, only
SL_SI91X_ENABLE_XTAL
is supported forsub_cmd_type
.SL_SI91X_ENABLE_XTAL
is ofuint8_t
datatype and user can pass 1 to enable and 0 to disable it.For alarm based sleep wakeup applications,
SL_SI91X_ENABLE_XTAL
is used to enable/disable the XTAL.
371
of file components/device/silabs/si91x/wireless/inc/sl_si91x_driver.h
sl_si91x_configure_timeout#
sl_status_t sl_si91x_configure_timeout (sl_si91x_timeout_type_t timeout_type, uint16_t timeout_value)
Sets different timeouts given by sl_si91x_timeout_type_t for the Si91x device.
[in] | timeout_type | Identifies which timeout type to set. Possible values are defined in sl_si91x_timeout_type_t. |
[in] | timeout_value | The timeout value to set. The time resolution depends on the timeout_type. |
This API configures various timeout settings such as authentication, association, channel active scan, channel passive scan timeout, and keep-alive timeout for the module.
The timeout type determines the specific timeout being set, and the timeout value specifies the duration.
This API should be called after sl_wifi_init.
Returns
sl_status_t. See Status Codes and Additional Status Codes for details.
Note
After a successful IP configuration, Gratuitous ARP is used as the periodic WLAN Keep-Alive packet with the configured keep_alive_timeout interval.
If there is no IP configuration, NULL Data Packets are used as the WLAN Keep-Alive packet.
As an alternative, users can use sl_si91x_set_timeout to set all timeouts before calling
sl_wifi_init()
.
404
of file components/device/silabs/si91x/wireless/inc/sl_si91x_driver.h
sl_si91x_set_timeout#
void sl_si91x_set_timeout (const sl_si91x_timeout_t * timeout_config)
Sets different module timeouts in a single call for the Si91X device.
[in] | timeout_config | Timeout configuration of type sl_si91x_timeout_t. |
This API sets all the timeout configurations in a single call. It includes settings for the active channel scan timeout, authentication association timeout, and keep-alive timeout for the module.
Note
This API should ONLY be called before sl_wifi_init.
Repeated calls to this API will overwrite the timeout values stored in the SDK and will be applied on the next call to sl_wifi_init.
As an alternative, users can set individual timeouts using sl_si91x_configure_timeout() after calling
sl_wifi_init()
.
422
of file components/device/silabs/si91x/wireless/inc/sl_si91x_driver.h
sl_si91x_get_ram_log#
sl_status_t sl_si91x_get_ram_log (uint32_t address, uint32_t length)
Retrieves TA RAM log/dump via Si91x UART/UART2.
[in] | address | Address in Si91x module from which to start reading. |
[in] | length |
|
This function reads a chunk of data from the specified address in the Si91x module's RAM via UART or UART2. It is useful for debugging purposes by allowing access to the RAM log or dump.
Selection of debug UART can be done by using SL_SI91X_EXT_FEAT_UART_SEL_FOR_DEBUG_PRINTS
Returns
sl_status_t. See Status Codes and Additional Status Codes for details.
443
of file components/device/silabs/si91x/wireless/inc/sl_si91x_driver.h
sl_si91x_command_to_write_common_flash#
sl_status_t sl_si91x_command_to_write_common_flash (uint32_t write_address, const uint8_t * write_data, uint16_t write_data_length, uint8_t flash_sector_erase_enable)
Allows the Network Processor (NWP) to write content to the common flash from M4.
[in] | write_address | The address in the common flash memory where the write operation should begin.
|
[in] | write_data | Pointer to the data to be written. For sector erase, it should be multiples of 4K. |
[in] | write_data_length | The total length of the data, which should be multiples of 4K for sector erase. |
[in] | flash_sector_erase_enable | Enable or disable sector erase.
|
This function enables the NWP to write data to the common flash memory from the M4 core. It is a blocking API.
Returns
sl_status_t. See Status Codes and Additional Status Codes for details.
472
of file components/device/silabs/si91x/wireless/inc/sl_si91x_driver.h
sl_si91x_command_to_read_common_flash#
sl_status_t sl_si91x_command_to_read_common_flash (uint32_t read_address, size_t length, uint8_t * output_buffer)
Sends a command to read data from the NWP flash memory of the SI91x wireless device.
[in] | read_address | The address in the NWP flash memory to read from. The address should range from 0 to (20K-1). |
[in] | length | The number of bytes to read from the NWP flash memory. |
[out] | output_buffer | Pointer to the buffer where the read data will be stored. |
This function sends a command to the SI91x wireless device to read data from the NWP flash memory at the specified address. The read data is stored in the provided output buffer.
This is a blocking API.
Returns
sl_status_t. See Status Codes and Additional Status Codes for details.
498
of file components/device/silabs/si91x/wireless/inc/sl_si91x_driver.h
sl_si91x_get_firmware_version#
sl_status_t sl_si91x_get_firmware_version (sl_si91x_firmware_version_t * version)
Retrieve the firmware version currently installed on the SiWx91x device.
[out] | version | Pointer to an |
This function retrieves the firmware version currently installed on the SiWx91x device. The version information is stored in the provided sl_si91x_firmware_version_t
object.
This is a blocking API.
Pre-conditions:
sl_wifi_init should be called before this API.
Returns
sl_status_t. See Status Codes and Additional Status Codes for details.
518
of file components/device/silabs/si91x/wireless/inc/sl_si91x_driver.h
sl_si91x_get_firmware_size#
sl_status_t sl_si91x_get_firmware_size (void * buffer, uint32_t * fw_image_size)
Retrieve the firmware image size from the firmware image file.
[in] | buffer | Pointer to the buffer containing the firmware image file. |
[out] | fw_image_size | Pointer to a variable where the size of the firmware image will be stored. The value returned in this parameter is valid only if this API returns SL_STATUS_OK (0). |
This function reads the firmware image file from the provided buffer and returns the size of the firmware image.
This is a non-blocking API.
Returns
sl_status_t. See Status Codes and Additional Status Codes for details.
538
of file components/device/silabs/si91x/wireless/inc/sl_si91x_driver.h
sl_si91x_set_nwp_config_request#
sl_status_t sl_si91x_set_nwp_config_request (sl_si91x_nwp_configuration_t nwp_config)
Set configuration to NWP.
[in] | nwp_config | Configuration as identified by sl_si91x_nwp_configuration_t. Possible values for
|
This function sets the configuration for the Network Processor (NWP) based on the provided sl_si91x_nwp_configuration_t
structure.
The configuration values are determined by the code
element of the structure.
Pre-conditions:
sl_wifi_init() should be called before this API.
Returns
sl_status_t. See Status Codes and Additional Status Codes for details.
567
of file components/device/silabs/si91x/wireless/inc/sl_si91x_driver.h