Silicon Laboratories UG235.09 User Manual

UG235.09: Developing NCP Applications with Silicon Labs Connect v2.x
This chapter of the Connect v2.x User’s Guide describes how to develop Network Co-processor (NCP) applications with Silicon Labs Connect. The Connect stack is delivered as part of the Sili­con Labs Proprietary Flex SDK. The Connect v2.x User’s Guide assumes that you have already installed the Simplicity Studio de­velopment environment and the Flex SDK, and that you are fa­miliar with the basics of configuring, compiling, and flashing Con­nect-based applications. Refer to UG235.01: Developing Code with Silicon Labs Connect v2.x for an overview of the chapters in the Connect v2.x User’s Guide.
The Connect v2.x User’s Guide is a series of documents that provides in-depth infor­mation for developers who are using the Silicon Labs Connect Stack for their applica­tion development. If you are new to Connect and the Proprietary Flex SDK, see QSG138: Proprietary Flex SDK v2.x Quick Start Guide.
KEY POINTS
• Introduces the NCP.
• Discusses NCP and Host applications.
• Describes how to compile the two different types of applications.
• Explains the Connect Serial Protocol.
Proprietary is supported on all EFR32FG devices. For others, check the device's data sheet under Ordering Information > Protocol Stack to see if Proprietary is supported. In Proprietary SDK version 2.7.n, Connect is not supported on EFR32xG22.
silabs.com | Building a more connected world. Rev. 0.2
UG235.09: Developing NCP Applications with Silicon Labs Connect v2.x
Introduction

1. Introduction

NCP stands for Network Co-processor. By adding a Wireless Gecko (EFR32™) System on Chip (SoC) in NCP mode to their system, customers can implement a Connect-based wireless application that leverages the EFR32 Radio feature set. The original customer ap­plication (running on a Host device—PC, MCU) interfaces to and controls the NCP through the Universal Asynchronous Receiver­Transmitter (UART) interface as shown in the following figure.
Note: NCP should not be confused with virtual Network Co-processor (vNCP). For more information on vNCP, see AN1153: Develop- ing Connect vNCP Applications with Micrium OS.
Messages sent from the Host to the NCP are known as commands. Messages sent from the NCP to the Host are known as callbacks.
To carry commands and responses between a Host processor and an NCP, Connect uses the Asynchronous Serial Host version 3 (ASHv3) protocol. The Connect NCP commands and responses are encapsulated into ASHv3 messages. For details on the ASHv3 protocol, see UG115: ASHv3 Protocol Reference.
The NCP platform can also be loaded with a correctly-configured serial bootloader (bootloader-uart-xmodem). For additional informa­tion regarding this bootloader approach, see. UG235.06: Bootloading and OTA with Silicon Labs Connect.
silabs.com | Building a more connected world. Rev. 0.2 | 2
UG235.09: Developing NCP Applications with Silicon Labs Connect v2.x
NCP and Host Applications

2. NCP and Host Applications

In the NCP approach, a typical Connect-based application is divided into two separate applications that each implement one of the dis­tinct roles: NCP and Host. The NCP runs on the EFR32, while the Host application runs on the Host device.

2.1 NCP Application (SoC)

The NCP application runs on the EFR32 and supports communication with a Host application over a UART interface. The NCP applica­tion can be built as configured, or optionally can be augmented with customizations for target hardware, initialization, main loop pro­cessing, event definition/handling, and messaging with the Host. Silicon Labs provides two example NCP applications:
• project name: ncp-uart-hw uses hardware flow control.
• project name: ncp-uart-sw uses software flow control.
These NCP applications can be used out-of-the-box without any modification.

2.2 Host Application

The Host application can be compiled to almost any device with a suitable amount of memory and one free UART. The Host application examples are implemented for the Linux operating system. It is the customer's responsibility to port these to alternative systems as needed. Currently, Simplicity Studio does not support compilation for the Host architecture. Thus, compilation of the executable is only possible from outside of the Simplicity Studio environment (for example, from the command line). All Connect applications which are provided as standalone SoC applications are also available as NCP + Host applications.
Physical layer (PHY) parameters can be set only at compile time and only in the NCP application. Radio parameters are not configura­ble on the Host side.
silabs.com | Building a more connected world. Rev. 0.2 | 3
Loading...
+ 6 hidden pages