3731.Z-Stack ZNP Interface Specification
3731.Z-Stack ZNP Interface Specification
3731.Z-Stack ZNP Interface Specification
Applications
ZigBee systems Low power wireless sensor networks
Home/Building automation Set-top boxes and remote controls
Industrial control and monitoring Automated Meter Reading
Description
The Z-Stack ZNP is a cost-effective, low power,
ZigBee Network Processor that provides full
ZigBee functionality with a minimal Application Processor
development effort.
In this solution, the ZigBee PRO stack runs on Application
an SoC and the application runs on an
external microcontroller. The Z-Stack ZNP
handles all the ZigBee protocol tasks, and ZNP API CC2530 / CC2538 / CC2630
microcontroller.
Z-Stack ZNP interfaces to any microcontroller IEEE 802.15.4 Radio
through a range of serial interfaces. For
example, it can be combined with an MSP430
or Stellaris ARM Cortex-M3 microcontroller.
Key Features
All the powerful features of the ZigBee PRO system-on-chip with a simplified application
interface.
SPI , UART or USB interface to application processor with SPI speeds up to 2 MHz.
1 2 3
Designed for low power operation when using SPI interface with maximum time spent in low
power mode when using SPI interface.
Access to 12-bit analog-to-digital converter, GPIO pins, non-volatile memory
1
SPI interface is supported on CC2530 and CC2538.
2
UART interface is supported on CC2630/50, CC2530 and CC2538.
3
USB interface is supported on CC2538 and CC2531 only.
Acronyms
ADC Analog to Digital Conversion (or Converter)
AF ZigBee Application Framework
API Application Programming Interface
AREQ Asynchronous Request
CTS Clear To Send
FCS Frame Check Sequence
GPIO General Purpose I/O
NPI Network Processor Interface
NV Non-Volatile
PA/LNA Power Amplifier / Low Noise Amplifier (CC259x)
POLL Poll request
RPC Remote Procedure Call
RTS Ready To Send
SAPI Simple API
SoC System on Chip
SOF Start Of Frame
SPI Serial Peripheral Interface bus
SREQ Synchronous request
SRSP Synchronous response
UART Universal Asynchronous Receiver Transmitter
ZDO ZigBee Device Object
ZNP ZigBee Network Processor
2.1 CC2630/50
The CC2630 (and equivalently the CC2650) is the newest member of the family of Z–Stack ZNP
platforms. On CC2630, ZNP includes some significant differences when compared with the other
established ZNP paltforms:
TI-RTOS: As with all Z-Stack software products on CC2630, it is built on top of TI-RTOS,
a Real-Time Operating System developed by Texas Instruments.
NPI: On CC2630, the ZNP architecture incorporates a new NPI (Network Processor
Interface) subsystem. The NPI subsystem represents a convergance of Texas
Instruments Network Processor-based software products (eg. ZigBee, BLE, MAC) onto a
single common architecture. In the Network Processor approach, the core stack
operations run on the embedded device, while applications run on the external host.
The following sections for CC2630 are provided as a simple summary. For more information on
the NPI-based ZNP for CC2630, please refer to [R1].
NOTE: At this time, CC2630 ZNP only supports the UART NPI transport.
CC2630 Host
Processor
TX RX
RX TX
SRDY SRDY
MRDY MRDY
Bytes:
3-253 1
1
Bytes:
2 0-250
1
Length: The length of the data field of the frame. The length can range from 0-250.
Command: The command of the frame.
The command field is constructed of two bytes. The bytes are formatted as shown in the following
figure. The Cmd0 byte is transmitted first.
Cmd0 Cmd1
Bits:
4-0 7-0
7-5
Type Subsystem ID
ID: The command ID. The ID maps to a particular interface message. Value range: 0-255.
1 1 1 1 1 1
Length = 0x03 Cmd0 = 0x60 Cmd1 = 0x00 ErrorCode ReqCmd0 ReqCmd1
Attributes:
Length
Attribute Description
(byte)
Value Description
The ZNP can be reset when the application processor sends a SYS_RESET_REQ message.
Application
CC2538
Processor
GPIO
ADC input
The CC2538-ZNP uses the following signals for the hardware interface
MISO/MOSI/CLK/CS for SPI, and RX/TX/RTS/CTS for UART: These are the standard
signals used for SPI or UART communication. See sections 2.2.3.3 (for SPI) and 2.2.4.4
(for UART) for details.
SRDY: This signal is asserted by the CC2538 for power management and transaction
control when using SPI transport. The application processor can use a regular GPIO pin
to poll the status of this signal, or connect it to a GPIO with edge configurable interrupt
capability. See section 2.2.3.3 for details.
MRDY: This signal is asserted by the application processor for power management and
transaction control when using SPI transport. This is typically hardwired to the SS pin
and does not have to be controlled by a separate GPIO from the application processor.
See section 2.2.3.3 for details.
Transport Direction
CC2538- CC2538
CC2538 PIN (on
ZNP signal NAME
C2538)
SPI MOSI P1_18 PA4 In
SPI CS P1_14 PA3 In
SPI CLK P1_16 PA2 In
SPI MISO P1_20 PA5 Out
SPI SRDY P1_03 PB0 Out
SPI MRDY P1_08 PC5 In
In this configuration, the CC2538-ZNP will use the USB transport the pin-out of the CC2538 can
be found in the datasheet. The USB transport exposes the CDC (communication device class)
class USB interface and exposes a virtual COM port to the host. The host processor would then
access this device as a regular COM port device and communicate with the ZNP using the UART
Two additional signals are required for SPI transaction handling and power management:
MRDY: Master ready, an active low signal. This signal is set by the application
processor when it has data ready to send to the CC2538. This signal can either be
controlled independently or it can be hardwired to the slave select signal.
SRDY: Slave ready, a bi-modal signal. This signal is set by the CC2538 when it is ready
to receive or send data. When set low, it indicates the CC2538 is ready to receive data.
When set high during an SPI POLL or SREQ transaction it indicates the CC2538 is ready
to send data. When set high during an SPI AREQ transaction it indicates the CC2538 is
done receiving data.
2.2.3.4 Signal Operation
The signals operate according to the following rules:
1. The application processor initiates a transaction by setting MRDY low and then waits for
SRDY to go low.
2. The application processor shall never set MRDY high to end a transaction before all bytes
of the frame have been transferred.
3. When receiving a POLL or SREQ, the CC2538 shall set SRDY high when it has data
ready for the application processor.
4. When receiving an AREQ, the CC2538 shall set SRDY high when all bytes of the frame
have been received.
The following figure shows an AREQ command sent from the application processor to the
CC2538.
The following figure shows a POLL command sent from the application processor to the CC2538-
ZNP.
The following sequence of events occurs on the application processor and CC2538:
1. CC2538 has an AREQ frame to send. When ready to receive data set SRDY low.
2. Application processor detects SRDY low and sets MRDY low. Prepare POLL command
and set CS low and start data transmission.
3. Application processor transmits data until frame is complete. Then raise the CS.
4. CC2538 receives data until frame is complete.
5. Application processor waits for SRDY to go high.
The following figure shows a SREQ command sent from the application processor to the CC2538-
ZNP.
The following sequence of events occurs on the application processor and CC2538-ZNP:
1. Application processor has an SREQ frame to send. Set MRDY low and wait for SRDY to
go low.
2. CC2538 receives falling edge of MRDY. When ready to receive data set SRDY low.
3. Application processor reads SRDY low. Start data transmission.
4. Application processor Sets CS low and transmits data until frame is complete, then sets
CS high.
5. CC2538 receives data until frame is complete.
6. Application processor waits for SRDY to go high.
7. CC2538 processes SREQ command and executes function
8. CC2538 prepares SRSP frame. When ready to transmit data set SRDY high.
9. Application processor reads SRDY high. Start data reception.
10. Application processor, sets CS low and receives data until frame is complete, then sets
CS high.
11. CC2538 transmits data until frame is complete.
12. Application processor receives complete frame. Set MRDY high.
The ZNP SPI protocol is a half duplex protocol. Though SPI, is full duplex, valid bytes are either
on MOSI or MISO. When the Slave is transmitting bytes out on MISO, the CC2538 ZNP Slave
depends on MRDY de-assert for End of transmission. That is when the Master de-asserts MRDY,
the Slave considers this end of transmit and moves to the next stae. Hence, even if the Master is
slow to de-assert the MRDY, the Slave will not move to the next transaction
If there is ever an RX FIFO overlflow on the Slave, the Slave will raise the SRDY and immediately
transmit out zeros. Though the current packet is lost, this ensures that the next packet is received.
CC2538 Host
Processor
TX RXD
CTS RTS
RX TXD
RTS CTS
4. For ZNP_ALT configuration, the application processor sets CC2538 EM_RESETpin high
and CC2538 starts operation. Please ignore this step if not using ZNP_ALT preprocessor
define.
5. Application processor receives the SYS_RESET_IND message using the POLL
command. When SPI transport is used CC2538 will set SRDY low to indicate the
message is available and the application processor should retrieve the message.
6. The application processor receives the SYS_RESET_IND message.
The CC2538-ZNP can be reset when the application processor sends a SYS_RESET_REQ
message.
GPIO
The CC2530-ZNP uses the following signals for the hardware interface
MI/MO/C/SS for SPI, and RX/TX/RT/CT for UART: These are the standard signals used
for SPI or UART communication. See sections 2.3.3.3 (for SPI) and 2.3.4.4 (for UART) for
details.
SRDY: This signal is asserted by the CC2530 for power management and transaction
control when using SPI transport. The application processor can use a regular GPIO pin
to poll the status of this signal, or connect it to a GPIO with edge configurable interrupt
capability. See section 2.3.3.3 for details.
MRDY: This signal is asserted by the application processor for power management and
transaction control when using SPI transport. This is typically hardwired to the SS pin
and does not have to be controlled by a separate GPIO from the application processor.
See section 2.3.3.3 for details.
RESET: This signal is used by the application processor to reset the CC2530.
CFG0, CFG1: These two signals are used to configure the CC2530-ZNP. The CC2530-
ZNP reads these signals at power up and configures its operation accordingly. See
section 2.3.1.1.1 for details.
The CC2530-ZNP project reads the two hardware configuration pins at powerup and configures
itself accordingly.
The CFG0 pin is used to indicate the presence (if pin is high) or absence of the 32kHz crystal
connected to the CC2530-ZNP. This is the sleep crystal that is used to maintain accurate timing
when the device is in sleep mode. The advantage of using this instead of the internal 32kHz
oscillator is that it typically provides faster wakeup time for sleep and a lower power consumption
during this time. If this crystal is not populated, then the CC2530 can use the internal RC
oscillator.
If the CFG1 pin is high, the CC2530-ZNP will use the SPI transport mode in the main pin
configuration listed below. Otherwise, it will use the UART transport mode in the alternate pin
SS / CT 6 P1_4 In
C / RT 5 P1_5 In / Out
MO / TX 38 P1_6 In / Out
MI / RX 37 P1_7 Out / In
RESET 20 RESET_N In
MRDY 16 P0_3 In
SRDY 15 P0_4 Out
PAEN 9 P1_1 Out
EN 7 P1_3 Out
HGM 12 P0_7 Out
CFG0 8 P1_2 In
CFG1 36 P2_0 In
GPIO0/AIN0 19 P0_0 Configurable
GPIO1/AIN1 18 P0_1 Configurable
GPIO2 13 P0_6 Configurable
GPIO3 11 P1_0 Configurable
SS / CT 15 P0_4 In
C / RT 14 P0_5 In / Out
MO / TX 16 P0_3 In / Out
MI / RX 17 P0_2 Out / In
RESET 20 RESET_N In
MRDY 38 P1_6 In
SRDY 37 P1_7 Out
PAEN 9 P1_1 Out
EN 6 P1_4 Out
HGM 12 P0_7 Out
CFG0 8 P1_2 In
CFG1 36 P2_0 In
GPIO0/AIN0 19 P0_0 Configurable
GPIO1/AIN1 18 P0_1 Configurable
GPIO2 13 P0_6 Configurable
GPIO3 11 P1_0 Configurable
SS / CT 15 P0_4 In
C / RT 14 P0_5 In / Out
MO / TX 16 P0_3 In / Out
MI / RX 17 P0_2 Out / In
RESET 20 RESET_N In
MRDY 36 P2_0 In
SRDY 11 P1_0 Out
PAEN 9 P1_1 Out
EN 6 P1_4 Out
HGM 12 P0_7 Out
CFG0 19 P0_0 In
CFG1 18 P0_1 In
GPIO0 13 P0_6 Configurable
GPIO1 12 P0_7 Configurable
GPIO2 38 P1_6 Configurable
GPIO3 37 P1_7 Configurable
This is only available when used with the CC2531 chip. In this configuration, the CC2530-ZNP will
use the USB transport with the alternate pin configuration. The pin-out of the CC2531 can be
found in the datasheet [R6]. The USB transport exposes the CDC (communication device class)
class USB interface and exposes a virtual COM port to the host. The host processor would then
access this device as a regular COM port device and communicate with the ZNP using the UART
Transport.
Two additional signals are required for SPI transaction handling and power management:
MRDY: Master ready, an active low signal. This signal is set by the application
processor when it has data ready to send to the CC2530. This signal can either be
controlled independently or it can be hardwired to the slave select signal. The RPC
sequence diagrams in this document assume MRDY is hardwired to SS.
SRDY: Slave ready, a bi-modal signal. This signal is set by the CC2530 when it is ready
to receive or send data. When set low, it indicates the CC2530 is ready to receive data.
When set high during an SPI POLL or SREQ transaction it indicates the CC2530 is ready
to send data. When set high during an SPI AREQ transaction it indicates the CC2530 is
done receiving data.
The following figure shows an AREQ command sent from the application processor to the
CC2530.
SRDY
MRDY/SS
MO
MI
Host
1, 3 4 6, 8
processor
CC2530 2 5 7
The following sequence of events occurs on the application processor and CC2530:
1. Application processor has an AREQ frame to send. Set MRDY low and wait for SRDY to
go low.
2. CC2530 receives falling edge of MRDY. When ready to receive data set SRDY low.
3. Application processor reads SRDY low. Start data transmission.
4. Application processor transmits data until frame is complete.
5. CC2530 receives data until frame is complete.
6. Application processor waits for SRDY to go high.
7. CC2530 receives complete frame and sets SRDY high.
8. Application processor reads SRDY high. Set MRDY high.
The following figure shows a POLL command sent from the application processor to the CC2530-
ZNP.
SRDY
MRDY/SS
MO
MI
Host
2, 3 5, 7 8 10
processor
CC2530 1 4 6 9
The following sequence of events occurs on the application processor and CC2530:
1. CC2530 has an AREQ frame to send. When ready to receive data set SRDY low.
2. Application processor detects SRDY low and sets MRDY low. Prepare POLL command
and start data transmission.
3. Application processor transmits data until frame is complete.
4. CC2530 receives data until frame is complete.
5. Application processor waits for SRDY to go high.
6. CC2530 prepares AREQ frame for transmission. When ready to transmit set SRDY high.
7. Application processor reads SRDY high. Start data reception.
8. Application processor receives data until frame is complete.
9. CC2530 transmits data until frame is complete.
10. Application processor receives complete frame. Set MRDY high.
The following figure shows a SREQ command sent from the application processor to the CC2530-
ZNP.
SRDY
MRDY/SS
MO
MI
Host 1, 3 4 6, 9 12
10
processor
CC2530 2 5 7 8 11
The following sequence of events occurs on the application processor and CC2530-ZNP:
1. Application processor has an SREQ frame to send. Set MRDY low and wait for SRDY to
go low.
2. CC2530 receives falling edge of MRDY. When ready to receive data set SRDY low.
3. Application processor reads SRDY low. Start data transmission.
4. Application processor transmits data until frame is complete.
5. CC2530 receives data until frame is complete.
6. Application processor waits for SRDY to go high.
7. CC2530 processes SREQ command and executes function
8. CC2530 prepares SRSP frame. When ready to transmit data set SRDY high.
9. Application processor reads SRDY high. Start data reception.
10. Application processor receives data until frame is complete.
11. CC2530 transmits data until frame is complete.
12. Application processor receives complete frame. Set MRDY high.
CC2530 Host
Processor
TX RXD
CT RTS
RX TXD
RT CTS
If the CC2530-ZNP device was configured as an end-device (and using SPI transport), it will
automatically enter low power state after the application processor retrieves the SYS_RESET_IND
command from the CC2530.
The CC2530-ZNP can also be reset when the application processor sends a SYS_RESET_REQ
message. However, resetting CC2530 with the RESET_N pin is recommended because it is
faster and more reliable.
Host ZNP