NCP Mode (Full Stack on NWP)#

In NCP (Network Co-Processor) mode, the full Bluetooth Low Energy (BLE) stack runs on the Network Processor (NWP), and an external host processor communicates with the NWP through SPI, SDIO, or UART interfaces.

NCP Mode Architecture#

NCP Architecture:

Figure: SoC Mode DiagramFigure: SoC Mode Diagram

Component placement and interfaces:

  • Full BLE Stack: Runs entirely on the NWP

  • Host Interface: External host communicates through SPI/SDIO/UART

  • Host SDK: Host uses WiSeConnect SDK to communicate with NWP

Host Responsibilities:

  • Application logic

  • Host interface communication

  • Event handling and response

  • User/application API handling (calling BLE APIs from the host application through WiSeConnect SDK)

NWP Responsibilities:

  • Complete BLE stack (GAP, GATT, L2CAP, etc.)

  • LE Controller, Link Layer, PHY

  • Radio management

NCP Mode Characteristics#

Advantages:

  • Simplified Host: Host only needs to use WiSeConnect SDK

  • Full Stack Features: All BLE features available without host stack implementation

  • Firmware Updates: Stack updates through NWP firmware updates

  • Lower Host Requirements: Host doesn't need BLE stack implementation

Considerations:

  • Host Interface Overhead: Communication overhead for all BLE operations

  • Latency: Host interface adds latency to BLE operations

  • Throughput: Limited by host interface bandwidth

BLE Operations in NCP Mode#

API Usage:

  • All BLE APIs are available through WiSeConnect SDK host library

  • APIs are blocking or event-based depending on implementation

  • Host library handles serial interface communication and protocol conversion between application and NWP

Host Serial Interface Integration:

  • The WiSeConnect SDK uses a Hardware Abstraction Layer (HAL) pattern for serial communication

  • The host developer must implement HAL functions (for example, sl_si91x_host_spi_transfer(), sl_si91x_host_uart_transfer()) using platform-specific serial drivers—these implementations are required for NCP mode; the SDK does not provide them

  • The SDK calls these HAL functions when it needs to communicate with the NWP

  • The host implements these functions in HAL files, mapping SDK calls to the host's SPI/UART/SDIO drivers

  • For the current list of HAL APIs to implement, see the Implement HAL porting step

Porting Requirements for NCP Mode: When porting WiSeConnect SDK to an external host MCU for NCP mode, the following steps are required:

  1. Add WiSeConnect SDK to Application (Porting Steps: Add SDK):

    • Integrate WiSeConnect SDK components and required files from Simplicity SDK

    • Port compiler/architecture-specific functions (CORE_EnterAtomic, CORE_ExitAtomic, CORE_EnterCritical, CORE_ExitCritical)

    • Configure project build settings and include paths

  2. Implement Hardware Abstraction Layer (HAL) (Porting Steps: Implement HAL):

    • Serial Interface Functions: Implement sl_si91x_host_spi_transfer() and/or sl_si91x_host_uart_transfer() for data transfer

    • High-Speed Bus: Implement sl_si91x_host_enable_high_speed_bus() if using SPI > 25 MHz

    • GPIO Functions: Implement reset control (sl_si91x_host_hold_in_reset(), sl_si91x_host_release_from_reset()) and sleep/wake indication for power-save functionality (sl_si91x_host_set_sleep_indicator(), sl_si91x_host_clear_sleep_indicator(), sl_si91x_host_get_wake_indicator())

    • Interrupt Handlers: Implement sl_si91x_host_enable_bus_interrupt() and sl_si91x_host_disable_bus_interrupt() for frame pending interrupts

    • Initialization: Implement sl_si91x_host_init() and sl_si91x_host_deinit()

  3. Define CMSIS RTOS2 APIs (Porting Steps: Define RTOS APIs):

    • Port kernel management (osKernelInitialize, osKernelStart, osKernelGetTickCount)

    • Port thread management (osThreadNew)

    • Port synchronization primitives (osMutexNew, osMutexAcquire, osMutexRelease, osEventFlagsNew, osEventFlagsSet, osEventFlagsWait)

    • Port delay functions (osDelay)

    • Map to your RTOS implementation (FreeRTOS, ThreadX, etc.)

  4. Define Preprocessor Macros (Porting Steps: Define Macros):

    • Required: SLI_SI917, SLI_SI917B0, SLI_SI91X_MCU_CONFIG_RADIO_BOARD_VER2

    • Optional: SL_SI91X_SPI_HIGH_SPEED_ENABLE (for SPI > 25 MHz), SLI_SI91X_OFFLOAD_NETWORK_STACK (for network stack offload)

Reference: See Porting WiSeConnect SDK for an External Host - Overview and Porting Steps for complete porting guidance.

Event Handling:

  • BLE events received through host interface

  • Host application processes events and responds

  • Event callbacks are registered through the WiSeConnect SDK BLE callback registration APIs; see Callback Registration for the full set (GAP, GATT, SMP, and extended/advertising-extension callbacks)

Configuration:

  • BLE configuration through host interface commands

  • System configuration set during initialization

  • Runtime configuration through API calls

Reference: See NCP Mode Documentation for detailed NCP mode information.


APIs Used in This Section#

Topic

APIs / symbols

Reference

Host HAL

sl_si91x_host_spi_transfer(), sl_si91x_host_uart_transfer(), sl_si91x_host_enable_high_speed_bus(), sl_si91x_host_hold_in_reset(), sl_si91x_host_release_from_reset(), sl_si91x_host_set_sleep_indicator(), sl_si91x_host_clear_sleep_indicator(), sl_si91x_host_get_wake_indicator(), sl_si91x_host_enable_bus_interrupt(), sl_si91x_host_disable_bus_interrupt(), sl_si91x_host_init(), sl_si91x_host_deinit()

Implement HAL

Compiler portability

CORE_EnterAtomic, CORE_ExitAtomic, CORE_EnterCritical, CORE_ExitCritical

Add WiSeConnect SDK to Application

CMSIS RTOS2 (port)

osKernelInitialize, osKernelStart, osKernelGetTickCount, osThreadNew, osMutexNew, osMutexAcquire, osMutexRelease, osEventFlagsNew, osEventFlagsSet, osEventFlagsWait, osDelay

Define CMSIS RTOS2 APIs

Preprocessor macros

SLI_SI917, SLI_SI917B0, SLI_SI91X_MCU_CONFIG_RADIO_BOARD_VER2, SL_SI91X_SPI_HIGH_SPEED_ENABLE, SLI_SI91X_OFFLOAD_NETWORK_STACK

Define Preprocessor Macros

BLE (host library)

WiSeConnect SDK BLE APIs on the external host (see BLE API reference for entry points)

BLE API Reference guide