Cy-Solved Structured Software Environment
Cyan has created a modular software solution that enables out-of-the-box operation for RF-Solved modules, systems designed around development kits and reference designs. It also provides the basis of the easy adaptability of Cy-Net to custom networking needs and the linking with other hardware and communications protocols eg. USB and Ethernet.
The Cy-Solved Structured Software Environment separates code into system resources, technology dependent functions, technology independent functions, and end user applications.
The Resource Layer provides an Application Programming Interface (API) for all functions that depend on processor related hardware, e.g. timers, counters, UARTS, and general purpose inputs/outputs (GPIO). This allows code developed at the higher layers to be easily switched between the eCOG1K and eCOG1X processors and different resource implementations.
The Technology Layer supports higher level functions that depend on specific hardware technology. These include the Cyan-Micrel radio stack, interfaces to cameras and displays, analogue interfaces (to accelerometers, thermometers, and current clamps), AT command interfaces to GPRS modems, GPS devices, and Ethernet channels. Each technology layer module makes an API available to the macro and application layers. This allows technologies to be changed within a system with minimal changes to the overall software.
The Macro Layer uses the API's provided by the technology and resource layers to implement a number of common embedded functions. These include JPEG compression routines, and bridging functions between Ethernet, UART, and radio channels. These functions can be used and extended by user specific application code (within the application layer).
Cy-Net in the Resource Layer
GPIO signals are used to implement control and data communication channels between the eCOG1K/1X micro-controller, and the MICRF6XX radio transceiver/ receiver. Cyan document AN035 describes the hardware implementation and signalling between the micro controller and the radio.
The UART channel is primarily used to provide diagnostic information for the radio stack. This includes print stream and debug assert messages. The same UART channel can also be used to send data over the radio stack, using either SMS or an AT command interface.
The system module provides basic timing functions for the radio protocol, and a slot timer for the frequency hopper.
Cy-Net in the Technology Layer
The Cy-Net stack is implemented as four protocol layers that correspond, as far as possible, to the standard ISO model.
Layer 1 provides all of the functions needed to program the MICRF6XX radio transceiver/receiver to transmit and receive data over the physical air interface. The functions supported at this level include powering the radio up/down, switching the radio between transmit and receive modes, and setting the transmit/receive frequency.
Layer 2 implements the protocol needed to transmit data packets between two nodes within a radio network (i.e. the data link layer). This includes an interrupt driven routine for sampling data from the radio device. This is driven from the clock signal recovered from the received data. The layer 2 protocol also introduces a 16 bit system address that filters packets destined for other networks operating in the same space.
Layer 3 implements the packet routing protocol for the MicrelNet network. This works in conjunction with the radio manager which interprets the network addresses assigned to nodes in the network. Network addresses are 32 bits in length, and support a master slave star configuration. The network layer examines incoming packets to determine whether they need to be passed up to the transport layer (i.e. whether they are destined for the node). The layer 3 protocol may also forward packets destined for slave nodes, or ignore packets that do not need to be processed any further.
Layer 4 examines packets destined for the node, and reconstructs messages from multiple packets, before passing messages up to the macro/application layers. The layer 4 protocol also takes messages from the macro/application layers and construct sequences of packets to be passed on to the layer 3 protocol. Two transport modes are supported by the layer 4 protocol - the Reliable Data Paradigm (RDP) and the Unreliable Data Paradigm (UDP).