Core#

Functions#

sl_status_t

Retrieves the saved thread-specific firmware status value.

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.

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).

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.

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.

void
sl_si91x_set_timeout(const sl_si91x_timeout_t *timeout_config)

Sets different module timeouts in a single call for the Si91X device.

sl_status_t
sl_si91x_get_ram_log(uint32_t address, uint32_t length)


Retrieves TA RAM log/dump via Si91x UART/UART2.

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.

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.

sl_status_t
sl_si91x_get_firmware_version(sl_si91x_firmware_version_t *version)

Retrieve the firmware version currently installed on the SiWx91x device.

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.

sl_status_t
sl_si91x_set_nwp_config_request(sl_si91x_nwp_configuration_t nwp_config)

Set configuration to NWP.

sl_status_t
sl_si91x_get_nwp_config(const sl_si91x_nwp_get_configuration_t *nwp_config, uint8_t *response)

Retrieve the configuration value from the firmware based on the requested sub_command_type element of sl_si91x_nwp_get_configuration_t structure.

sl_status_t
sl_si91x_debug_log(sl_si91x_assertion_t *assertion)

Debug prints on UART interfaces 1 and 2.

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.

Parameters
N/A

This function fetches the firmware status value that is specific to the current thread.

Returns


Definition at line 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.

Parameters
[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.

Returns

Note

  • Ensure that the Real-Time Clock (RTC) timer is configured to enable SSL certificate validation.


Definition at line 335 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).

Parameters
[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.

Returns


Definition at line 355 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.

Parameters
[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:

Returns

Note

  • The output_len and output_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 for sub_cmd_type.

    • SL_SI91X_ENABLE_XTAL is of uint8_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.


Definition at line 400 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.

Parameters
[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.

Returns

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().


Definition at line 433 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.

Parameters
[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().


Definition at line 451 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.

Parameters
[in]address

Address in Si91x module from which to start reading.

[in]length


Length of the chunk to read from the Si91x module.

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


Definition at line 472 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.

Parameters
[in]write_address

The address in the common flash memory where the write operation should begin.

  • For the M4 region, the write address should start from 0x8000000. Possible values range from the M4 image end address to the M4 region end address.

  • For the NWP region, the write address should range from 0 to (20K-1).

  • For sector erase, it should be multiples of 4K.

[in]write_data

Pointer to the data to be written.

[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.

  • 1: Erases multiples of 4 KB of data.

  • 0: Disable, allows writing data onto flash.

This function enables the NWP to write data to the common flash memory from the M4 core. It is a blocking API.

Returns


Definition at line 502 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.

Parameters
[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


Definition at line 528 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.

Parameters
[out]version

Pointer to an sl_si91x_firmware_version_t object that will be populated with the firmware version information.

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:

Returns


Definition at line 548 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.

Parameters
[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


Definition at line 568 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.

Parameters
[in]nwp_config

Configuration as identified by sl_si91x_nwp_configuration_t. Possible values for config.code are defined below:

  • For SL_SI91X_XO_CTUNE_FROM_HOST:

    • nwp_config.values.config_val is used to configure NWP's XO Ctune value.

  • For SL_SI91X_ENABLE_NWP_WDT_FROM_HOST:

    • nwp_config.values.wdt_timer_val is used to configure the NWP WDT ISR timer, currently set to 32 seconds.

    • nwp_config.values.wdt_enable_in_ps is used to enable WDT in powersave mode.

  • For SL_SI91X_DISABLE_NWP_WDT_FROM_HOST:

    • Disables NWP WDT ISR timer. nwp_config.values.config_val is not utilized by the NWP.

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.

Returns


Definition at line 597 of file components/device/silabs/si91x/wireless/inc/sl_si91x_driver.h

sl_si91x_get_nwp_config#

sl_status_t sl_si91x_get_nwp_config (const sl_si91x_nwp_get_configuration_t * nwp_config, uint8_t * response)

Retrieve the configuration value from the firmware based on the requested sub_command_type element of sl_si91x_nwp_get_configuration_t structure.

Parameters
[in]nwp_config

Configuration as identified by sl_si91x_nwp_get_configuration_t. Possible values for nwp_config.sub_command_type are defined below:

  • For GET_OPN_BOARD_CONFIG:

    • nwp_config.sub_command_type is used to get board OPN part number.

    • OTP bits should be programmed with the board OPN part number otherwise the API will return NULL characters for OTP bits.

    • Currently, all other values are NOT SUPPORTED.

[out]response

Buffer to hold board OPN part number. The value returned in this param is valid only if this API returns SL_STATUS_OK(0).

Returns


Definition at line 617 of file components/device/silabs/si91x/wireless/inc/sl_si91x_driver.h

sl_si91x_debug_log#

sl_status_t sl_si91x_debug_log (sl_si91x_assertion_t * assertion)

Debug prints on UART interfaces 1 and 2.

Parameters
[in]assertion

Configuration as identified by sl_si91x_assertion_t.

  • Assertion type (Possible values are 0 - 15):

    • 0000 (LMAC core)

    • 0001 (SME)

    • 0010 (UMAC)

    • 0100 (NETX)

    • 1000 (Enables assertion indication and provides ram dump in critical assertion)

  • Assertion level (Possible values are 0 - 15):

    • 0 is only for specific prints & 15 is to enable all prints.

    • 0000 (Assertion required)

    • 0010 (Recoverable)

    • 0100 (Information)

Host can get 5 types of debug prints based on the assertion level and assertion type. This is a blocking API.

  • Pre-conditions:

Returns


Definition at line 641 of file components/device/silabs/si91x/wireless/inc/sl_si91x_driver.h