diff --git a/nrf70_bm_lib/docs/source/nrf70_bm_lib.rst b/nrf70_bm_lib/docs/source/nrf70_bm_lib.rst index c32c5e3..da4cff5 100644 --- a/nrf70_bm_lib/docs/source/nrf70_bm_lib.rst +++ b/nrf70_bm_lib/docs/source/nrf70_bm_lib.rst @@ -98,3 +98,45 @@ The library driver code execute in the following contexts:" .. note:: In the reference implementation for Zephyr tasklet work is offloaded to Zephyr kernel workqueues. +Optimizing scan operation +######################### + +The nRF70 Series BM library provides a single API to perform a Wi-Fi scan operation. +The scan operation is optimized to provide a wide range of scan configuration parameters. + +Please see `Optimizing scan operation `_ for more information. + +nRF70 Series device states +########################## + +The power save state of the nRF70 Series device is described through a combination of the physical power state of the logic or circuits and the logical functional state as observed by 802.11 protocol operations. + +Power state +*********** + +The nRF70 Series device can be in one of the following power states: + +* **Active:** The device is **ON** constantly so that it can receive and transmit the data. +* **Sleep:** The device is **OFF** to the majority of the blocks that cannot receive and transmit the data. + In this state, the device consumes low power (~15 µA). + Real-time Clock (RTC) domain, RF retention memory, and firmware retention memory are powered **ON** to retain the state information. +* **Shutdown:** The device is completely powered **OFF**. + In this state, the device consumes very low power (~2 µA) and does not retain any state information (apart from the values in the OTP memory). + The device will only respond to a BUCKEN assertion to wake from the Shutdown state. + +.. note:: + + To allow the nRF70 Series device enter the **Sleep** state when applicable, the ``CONFIG_NRF_WIFI_LOW_POWER`` Kconfig option must be enabled. + +The nRF70 Series transition to and from the **Shutdown** state is automatically managed by the nRF Wi-Fi driver. +When the **FMAC** is de-initialized, the nRF Wi-Fi driver puts the nRF70 Series device in Shutdown state. +When the **FMAC** is initialized, the nRF Wi-Fi driver puts the nRF70 Series device in Active state. + +Functional state +**************** + +In terms of functionality, the nRF70 Series device can reside in the following states: + +* **Scanning:** The device is in the scanning state, it is **Active** and is scanning for the available networks. +* **Idle:** The device automatically enters the **Sleep** state, once the scan session (on all selected bands and channels) is completed and after a certain period of inactivity. + The period of inactivity is fixed in the firmware and is not configurable, it is set to 500ms. diff --git a/nrf70_bm_lib/docs/source/nrf70_bm_porting_guide.rst b/nrf70_bm_lib/docs/source/nrf70_bm_porting_guide.rst index 481e435..6de33f9 100644 --- a/nrf70_bm_lib/docs/source/nrf70_bm_porting_guide.rst +++ b/nrf70_bm_lib/docs/source/nrf70_bm_porting_guide.rst @@ -19,6 +19,10 @@ The reference implementation of the BM Driver for the Zephyr RTOS uses build-tim - Description - OS agnostic layer API - Reference Zephyr API + * - IRQ + - Used to manage the interrupts from the nRF70 Series device. + - nrf_wifi_osal_bus_qspi_dev_intr_reg()/nrf_wifi_osal_bus_qspi_dev_intr_unreg() + - gpio_add_callback()/gpio_remove_callback() * - Tasklet - Used to process offloaded tasks from the nRF70 ISR context (typically events coming from the nRF70 Series device) - tasklet_schedule() @@ -49,6 +53,10 @@ The reference implementation of the BM Driver for the Zephyr RTOS uses build-tim The synchronization primitives used in the latest reference implementation have been updated to use Zephyr spinlocks instead of semaphores. +.. note :: + + The IRQ for nRF70 Series is configued as a GPIO pin, and is Edge triggered i.e., interrupt to be triggered on pin state change to logical level 1. + * *Driver model*: The reference implementation uses the Zephyr driver model to manage the nRF70 Series device. .. list-table:: Driver model porting guidelines diff --git a/nrf70_bm_lib/include/nrf70_bm_lib.h b/nrf70_bm_lib/include/nrf70_bm_lib.h index 8793af6..9e6d11a 100644 --- a/nrf70_bm_lib/include/nrf70_bm_lib.h +++ b/nrf70_bm_lib/include/nrf70_bm_lib.h @@ -144,7 +144,7 @@ struct nrf70_version { /** @brief Wi-Fi scanning types. */ enum nrf70_scan_type { - /** Active scanning (default). */ + /** Active scanning (default) - two probe requests are sent on each channel. */ NRF70_SCAN_TYPE_ACTIVE = 0, /** Passive scanning. */ NRF70_SCAN_TYPE_PASSIVE, @@ -178,11 +178,9 @@ struct nrf70_scan_params { * Refer to ::nrf70_frequency_bands for bit position of each band. */ uint8_t bands; - /** Active scan dwell time (in ms) on a channel. - */ + /** Active scan dwell time (in ms) on a channel - default 50ms */ uint16_t dwell_time_active; - /** Passive scan dwell time (in ms) on a channel. - */ + /** Passive scan dwell time (in ms) on a channel - default 130ms */ uint16_t dwell_time_passive; /** Array of SSID strings to scan. */