TEL 上海:+86 021 61639330 苏州:+86 0512 86669996 http://www.panchip.com Shanghai TEL: +86 02161639330 Suzhou: +86 0512 86669996 http://www.panchip.com
版权©2012 磐启微电子 Copyright © 2012 Pan Kai Microelectronics
XN297 XN297
2.4GHz 单片高速无线收发芯片 2.4GHz single-chip high-speed wireless transceiver chip
功能描述: Function Description:
频率范围24002483MHz Frequency range 24002483MHz
无线速率: 1或2Mbps Wireless rate: 1 or 2Mbps
SPI 接口速率:08Mbps SPI Interface rate: 08Mbps
通用型通信及增强型通信方式 General-purpose communications and enhanced communication mode
GFSK 单片收发芯片 GFSK monolithic transceiver chip
超低功耗 Ultra Low Power
内置硬件链路层 Built-in hardware link layer
自动应答及自动重传 Auto Answer and automatic retransmission
快速频道切换,可应用于跳频算法 Fast channel switching, frequency hopping algorithm can be applied to
20引脚QFN 4mm×4mm 封装 20-pin QFN 4mm × 4mm package
低成本晶振±60ppm Low-cost crystal ± 60ppm
使用简单低成本外围元器件 Using a simple low-cost external components
低工作电压:2.03.6V Low operating voltage: 2.03.6V
可支持双面PCB板方案 Program supports double-sided PCB board
应用领域: Applications:
无线鼠标及无线键盘 Wireless mouse and wireless keyboard
无线游戏设备 Wireless gaming device
无线数据通讯 Wireless data communication
智能电视遥控器 Smart TV remote control
无线标签 Radio tags
无线门禁 Wireless Access
安防系统 Security System
遥控装置 Remote control device
遥感勘测 Telemetry
智能运动设备 Intelligent sports equipment
工业传感器及无线工控设备 Industrial sensors and wireless industrial equipment
无线玩具 Wireless toys
TEL 上海:+86 021 61639330 苏州:+86 0512 86669996 http://www.panchip.com Shanghai TEL: +86 02161639330 Suzhou: +86 0512 86669996 http://www.panchip.com
版权©2012 磐启微电子 Copyright © 2012 Pan Kai Microelectronics
目录 Table of Contents
1. 1.
概述 ....................................................................................................................................... 2 Overview ................................................. .................................................. .................................... 2
2.主要电特性 ............................................................................................................................ 3 2 main electrical characteristics ............................................. .................................................. ............................. 3
3.系统结构方框图 .................................................................................................................... 3 Block diagram of the system architecture ............................................. 3 .................................................. ..................... 3
4.引脚定义 ................................................................................................................................ 4 4 pin definitions ............................................. .................................................. ................................. 4
5.绝对最大额定值 .................................................................................................................... 6 5 Absolute Maximum Ratings ............................................ .................................................. ...................... 6
6.芯片控制描述 ........................................................................................................................ 7 6 chip control description ............................................. .................................................. ......................... 7
6.1 工作模式 ......................................................................................................................... 7 6.1 Operating Mode ............................................... .................................................. ........................ 7
6.1.1 状态图 ..................................................................................................................... 7 6.1.1 state diagram ............................................. .................................................. ...................... 7
6.1.2 休眠模式 ................................................................................................................. 8 6.1.2 Sleep mode ............................................. .................................................. .................. 8
6.1.3 待机模式-I .............................................................................................................. 8 6.1.3 Standby mode -I ........................................... .................................................. ................. 8
6.1.4 待机模式-II ............................................................................................................. 8 6.1.4 Standby mode -II ........................................... .................................................. ................ 8
6.1.5 接收模式 ................................................................................................................. 9 6.1.5 receive mode ............................................. .................................................. .................. 9
6.1.6 发射模式 ................................................................................................................. 9 6.1.6 transmit mode ............................................. .................................................. .................. 9
6.2 不同模式引脚状态 ........................................................................................................ 9 6.2 different mode pin state ............................................ .................................................. .......... 9
6.3 数据包处理方式 .......................................................................................................... 10 6.3 packet handling ............................................. .................................................. ........... 10
6.3.1 通用型通信模式 ................................................................................................... 10 6.3.1 Universal communication mode ........................................... .................................................. ...... 10
6.3.2 增强型通信模式 ................................................................................................... 10 6.3.2 Enhanced communication mode ........................................... .................................................. ...... 10
6.3.3 增强型通信发送模式 ........................................................................................... 12 6.3.3 Enhanced communication transmission mode .......................................... ................................................. 12
6.3.4 增强型通信接收模式 ........................................................................................... 13 6.3.4 Enhanced communication receive mode .......................................... ................................................. 13
6.3.5 双向数据通信方式 ............................................................................................... 14 6.3.5 Bi-directional data communication ........................................... .................................................. .. 14
6.3.6 增强型通信模式下的数据包识别 ....................................................................... 14 Packet Identification 6.3.6 enhanced communication mode ...................................... ................................. 14
6.4 数据通道 ...................................................................................................................... 15 6.4 Data Channel ............................................... .................................................. ..................... 15
TEL 上海:+86 021 61639330 苏州:+86 0512 86669996 http://www.panchip.com Shanghai TEL: +86 02161639330 Suzhou: +86 0512 86669996 http://www.panchip.com
版权©2012 磐启微电子 Copyright © 2012 Pan Kai Microelectronics
7.数据和控制接口 .................................................................................................................. 17 7 data and control interface ............................................ .................................................. .................... 17
7.1 SPI 接口 ........................................................................................................................ 17 7.1 SPI interface ............................................... .................................................. ....................... 17
7.2 SPI 指令设置................................................................................................................. 17 7.2 SPI instruction set .............................................. .................................................. ................. 17
7.3 SPI 指令格式................................................................................................................ 17 7.3 SPI instruction format .............................................. .................................................. ................ 17
7.4 中断 .............................................................................................................................. 19 7.4 interrupt ................................................ .................................................. ............................ 19
7.5 SPI 时序 ....................................................................................................................... 19 7.5 SPI Timing ............................................... .................................................. ...................... 19
7.6 控制寄存器 .................................................................................................................. 21 7.6 Control Register ............................................... .................................................. ................. twenty one
7.7 数据包格式描述 .......................................................................................................... 29 7.7 Packet Format Description ............................................. .................................................. ........... 29
7.7.1 增强型通信模式的数据包形式 ........................................................................... 29 Data in the form of enhanced communication mode 7.7.1 package ....................................... .................................... 29
7.7.2 通用型通信模式的数据包形式 ........................................................................... 30 Data in the form of general-purpose communication mode 7.7.2 package ....................................... .................................... 30
8. 典型应用电路 ................................................................................................................ 31 8 Typical Application Circuit ............................................. .................................................. ................. 31
9. PCB 布线示例 ................................................................................................................. 32 9. PCB layout example ............................................. .................................................. .................. 32
10. 联系方式 ...................................................................................................................... 34 10. Contact .............................................. .................................................. ...................... 34
TEL 上海:+86 021 61639330 苏州:+86 0512 86669996 http://www.panchip.com Shanghai TEL: +86 02161639330 Suzhou: +86 0512 86669996 http://www.panchip.com
版权©2012 磐启微电子 Copyright © 2012 Pan Kai Microelectronics
1. 概述 1 Overview
XN297是一款工作在2.42.483GHz世界通用ISM频段的单片无线收发芯片。 XN297 is a work in single-chip wireless transceiver 2.42.483GHz world-wide ISM band chips. 该芯片集 The chip set
成了射频收发器、频率发生器、多通信模式控制器、晶体振荡器、调制器、解调器等功能模 Become a RF transceiver, a frequency generator, plural communication mode controller crystal oscillator, a modulator, a demodulator, and other functional modules
块。 Blocks. 通过SPI接口可以对输出功率、频道选择以及协议的设置等用途进行灵活配置。 Can be flexibly configured through the SPI interface to output power, channel selection and setting protocols and other purposes.
XN297芯片的优点: XN297 chip advantages:
低功耗 Low Power
当工作在发射模式下发射功率为0dBm时电流消耗为15mA; When operating in transmit mode transmit power of 0dBm current consumption of 15mA;
当工作在接收模式时电流消耗为14mA; When operating in the receive mode current consumption is 14mA;
当工作在休眠模式时电流消耗2uA。 When operating in Sleep mode current consumption 2uA.
低成本 Low cost
低成本系统解决方案; Low-cost system solutions;
外围元器件低于15个; External components is less than 15;
采用双层PCB,可以采用印制板天线方式; Using double-PCB, PCB antenna can be used the way;
可为客户提供完整的MCU解决方案。 Can provide customers with a complete MCU solutions.
高性能 High performance
工作频率2400MHz2483MHz; Operating frequency 2400MHz2483MHz;
最高数据码率2Mbps; The maximum data rate 2Mbps;
最大输出功率11dBm; Maximum output power 11dBm;
灵敏度可达到-88dBm。 Sensitivity can be achieved -88dBm.
TEL 上海:+86 021 61639330 苏州:+86 0512 86669996 http://www.panchip.com Shanghai TEL: +86 02161639330 Suzhou: +86 0512 86669996 http://www.panchip.com
版权©2012 磐启微电子 Copyright © 2012 Pan Kai Microelectronics
2.主要电特性 2 main electrical characteristics
表1 XN297主要电特性 Table 1 XN297 main electrical characteristics
特 性 Features
条件(除另有规定外,VCC = 3V± Condition (Unless otherwise specified, VCC = 3V ±
5%, TA=25℃) 5%, TA = 25 ℃)
参数值 Parameter values
单位 Unit
最小 Minimum
典型 Typical
最大 Maximum
ICC ICC
休眠模式 Sleep mode
2 2
uA uA
待机模式I Standby mode I
50 50
uA uA
待机模式Ⅱ Standby mode Ⅱ
750 750
uA uA
发射模式(0dBm) Transmit mode (0dBm)
15 15
16 16
mA mA
发射模式(8dBm) Transmit mode (8dBm)
23 Twenty three
25 25
mA mA
接收模式(2Mbps) Receive mode (2Mbps)
15 15
16 16
mA mA
接收模式(1Mbps) Receive mode (1Mbps)
14 14
15 15
mA mA
系统指标 System Specifications
OP OP
f f
工作频率 Operating Frequency
2400 2400
2483 2483
MHz MHz
res res
PLL PLL
锁相环跳频间隔 Phase-locked loop frequency hopping interval
1 1
80 80
MHz MHz
XTAL XTAL
f f
晶振频率 Crystal frequency
16 16
MHz MHz
M M
f f
1 1
Δ Δ
频率间隔@1Mbps Frequency interval @ 1Mbps
±0.16 ± 0.16
±0.25 ± 0.25
MHz MHz
M M
f f
2 2
Δ Δ
频率间隔@2Mbps Frequency interval @ 2Mbps
±0.32 ± 0.32
±0.50 ± 0.50
MHz MHz
码率 Rate
1 1
2 2
Mbps Mbps
M M
FCH FCH
1 1
频道间隔@1Mbps Channel spacing @ 1Mbps
1 1
MHz MHz
M M
FCH FCH
2 2
频道间隔@2Mbps Channel spacing @ 2Mbps
2 2
MHz MHz
发射模式指标 Transmit mode indicator
PRF PRF
典型输出功率1 A typical output power
8 8
dBm dBm
PRF PRF
典型输出功率2 Typical output power 2
0 0
dBm dBm
PRFC PRFC
输出功率范围 Output power range
-11 -11
11 11
dBm dBm
2 2
PBW PBW
载波调制的20dB 带宽(2Mbps) 20dB carrier modulation bandwidth (2Mbps)
2 2
2.1 2.1
MHz MHz
1 1
PBW PBW
载波调制的20dB 带宽(1Mbps) 20dB carrier modulation bandwidth (1Mbps)
1 1
1.1 1.1
MHz MHz
接收模式指标 Reception mode indicators
max max
RX RX
误码率<0.1%时的最大接收幅度 BER <0.1% the maximum amplitude of the received
0 0
dBm dBm
2 2
RXSENS RXSENS
接收灵敏度(0.1%BER) Receiver sensitivity (0.1% BER)
@2Mbps @ 2Mbps
-85 -85
dBm dBm
1 1
RXSENS RXSENS
接收灵敏度(0.1%BER) Receiver sensitivity (0.1% BER)
@1Mbps @ 1Mbps
-88 -88
dBm dBm
TEL 上海:+86 021 61639330 苏州:+86 0512 86669996 http://www.panchip.com Shanghai TEL: +86 02161639330 Suzhou: +86 0512 86669996 http://www.panchip.com
版权©2012 磐启微电子 Copyright © 2012 Pan Kai Microelectronics
CO CO
C Ι/ C Ι /
通道选择性@2Mbps Channel selectivity @ 2Mbps
13 13
dBc dBc
ST ST
C C
1 1
/Ι / Ι
第1 相邻道选择性@2Mbps The first adjacent channel selectivity @ 2Mbps
-8 -8
dBc dBc
ND ND
C C
2 2
/Ι / Ι
第2 相邻道选择性@2Mbps Second adjacent channel selectivity @ 2Mbps
-12 -12
dBc dBc
RD RD
C C
3 3
/Ι / Ι
第3 相邻道选择性@2Mbps 3rd adjacent channel selectivity @ 2Mbps
-20 -20
dBc dBc
4 4
/ /
TH TH
C Ι C Ι
第4 相邻道选择性@2Mbps The first four adjacent channel selectivity @ 2Mbps
-28 -28
dBc dBc
CO CO
C Ι/ C Ι /
通道选择性@1Mbps Channel selectivity @ 1Mbps
13 13
dBc dBc
ST ST
C C
1 1
/Ι / Ι
第1 相邻道选择性@1Mbps The first adjacent channel selectivity @ 1Mbps
5 5
dBc dBc
ND ND
C C
2 2
/Ι / Ι
第2 相邻道选择性@1Mbps Second adjacent channel selectivity @ 1Mbps
-10 -10
dBc dBc
RD RD
C C
3 3
/Ι / Ι
第3 相邻道选择性@1Mbps 3rd adjacent channel selectivity @ 1Mbps
-16 -16
dBc dBc
4 4
/ /
TH TH
C Ι C Ι
第4 相邻道选择性@1Mbps The first four adjacent channel selectivity @ 1Mbps
-24 -24
dBc dBc
操作条件 Operating Conditions
VDD VDD
供电电压 Supply voltage
2.0 2.0
3 3
3.6 3.6
V V
VSS VSS
芯片地 Chip ground
0 0
V V
OH OH
V V
高电平输出电压 High-level output voltage
VDD-0.3 VDD-0.3
VDD VDD
V V
OL OL
V V
低电平输出电压 Low level output voltage
VSS VSS
VSS+0.3 VSS + 0.3
V V
IH IH
V V
高电平输入电压 High-level input voltage
2.0 2.0
3 3
3.6 3.6
V V
IL IL
V V
低电平输入电压 Low Input Voltage
VSS VSS
VSS+0.3 VSS + 0.3
V V
工作温度 Operating Temperature
-40 -40
27 27
+85 +85
℃ ℃
储存温度 Storage Temperature
-40 -40
27 27
+125 +125
℃ ℃
TEL 上海:+86 021 61639330 苏州:+86 0512 86669996 http://www.panchip.com Shanghai TEL: +86 02161639330 Suzhou: +86 0512 86669996 http://www.panchip.com
版权©2012 磐启微电子 Copyright © 2012 Pan Kai Microelectronics
3.系统结构方框图 3 system block diagram structure
VS VS
S S
VDD VDD
IR IR
E E
F F
DV DV
DD DD
VDD VDD
_ _
P P
A A
图1 XN297系统结构方框图 Block diagram 1 XN297 system structure
TEL 上海:+86 021 61639330 苏州:+86 0512 86669996 http://www.panchip.com Shanghai TEL: +86 02161639330 Suzhou: +86 0512 86669996 http://www.panchip.com
版权©2012 磐启微电子 Copyright © 2012 Pan Kai Microelectronics
4.引脚定义 4 pin definitions
图2 XN2401引脚功能图 Figure 2 XN2401 pin function diagram
TEL 上海:+86 021 61639330 苏州:+86 0512 86669996 http://www.panchip.com Shanghai TEL: +86 02161639330 Suzhou: +86 0512 86669996 http://www.panchip.com
版权©2012 磐启微电子 Copyright © 2012 Pan Kai Microelectronics
表2 引脚功能说明 Table 2 Pin Function Description
引出端 Terminals
序号 No.
符号 Symbol
功能 Function
引出端 Terminals
序号 No.
符号 Symbol
功能 Function
1 1
CE CE
模式片选信号 Mode chip select signals
11 11
VDD_PA VDD_PA
电源输出 Power Output
2 2
CSN CSN
SPI 片选信号 SPI chip select signals
12 12
ANT1 ANT1
天线端口1 Antenna port 1
3 3
SCK SCK
SPI 时钟信号 SPI clock signal
13 13
ANT2 ANT2
天线端口2 Antenna port 2
4 4
MOSI MOSI
SPI 数据输入信号 SPI data input signal
14 14
VSS VSS
地(GND) Ground (GND)
5 5
MISO MISO
SPI 数据输出信号 SPI data output signal
15 15
VDD VDD
电源输入 Power Input
6 6
IRQ IRQ
中断信号 Interrupt signal
16 16
IREF IREF
参考电流 Reference current
7 7
VDD VDD
电源输入 Power Input
17 17
VSS VSS
地(GND) Ground (GND)
8 8
VSS VSS
地(GND) Ground (GND)
18 18
VDD VDD
电源输入 Power Input
9 9
XC1 XC1
晶振输入 Crystal Input
19 19
DVDD DVDD
电源输出 Power Output
10 10
XC2 XC2
晶振输出 Crystal Output
20 20
VSS VSS
地(GND) Ground (GND)
TEL 上海:+86 021 61639330 苏州:+86 0512 86669996 http://www.panchip.com Shanghai TEL: +86 02161639330 Suzhou: +86 0512 86669996 http://www.panchip.com
版权©2012 磐启微电子 Copyright © 2012 Pan Kai Microelectronics
5.绝对最大额定值 5 Absolute Maximum Ratings
供电电压: Supply voltage:
VDD ………………………………-0.3V+3.6V VDD .................................... -0.3V + 3.6V
VSS …………………………………0V VSS ....................................... 0V
输入电压 Input Voltage
VI……………………………………-0.3V+3.6V VI .......................................... -0.3V + 3.6V
输出电压 The output voltage
VO……………………………………VSSVDD VO .......................................... VSSVDD
总功耗 Total power consumption
PD(TA=85℃) ………………… 50mW PD (TA = 85 ℃) ..................... 50mW
温度 Temperature
工作温度…………………………… -40℃+ Operating temperature ................................. -40 ℃ +
存储温度…………………………… -40℃+ Storage temperature ................................. -40 ℃ +
* 注意:强行超过一项或多项极限值使用会导致器件永久性损坏。 * Note: The forced over one or more of the limits use can lead to permanent damage to the device.
* 小心:静电敏感器件,操作时遵守防护规则。 * CAUTION: Electrostatic sensitive devices comply with protection rules for the operation.
TEL 上海:+86 021 61639330 苏州:+86 0512 86669996 http://www.panchip.com Shanghai TEL: +86 02161639330 Suzhou: +86 0512 86669996 http://www.panchip.com
版权©2012 磐启微电子 Copyright © 2012 Pan Kai Microelectronics
6.芯片控制描述 6 chip control description
本章描述XN297 各种工作模式,以及用于控制XN297 工作模式的参数使用定义。 This chapter describes the XN297 various operating modes, as well as control XN297 operating modes for using the defined parameters. XN297 XN297
内部自带状态机用于控制芯片工作模式,状态机受控于寄存器配置的值和内部信号。 Own internal state machine for controlling the chip operating mode, the state machine is controlled by the value and the internal signal register configuration.
6.1 工作模式 6.1 Operating Mode
XN297 有5 种工作模式,本节会对这些状态进行描述。 XN297 There are five kinds of operating modes, this section will describe these states.
6.1.1 状态图 6.1.1 state diagram
图3 是XN297 工作状态图,表示5 种工作模式,以及5 种工作模式之间的跳变。 XN297 Figure 3 is a state diagram showing transitions five operating modes, and the five operating modes. XN297 XN297
在VDD 大于2.0V 才开始正常工作。 Began to work at the VDD is greater than 2.0V. 即使进入休眠模式,MCU 还是可以通过SPI 和CE 管 Even into sleep mode, MCU or via SPI and CE tube
脚控制芯片进入其它4 种状态。 Foot control chip into the other four states.
休眠 Sleep
模式 Mode
VDD >=2.0V VDD> = 2.0V
待机 Standby
模式-I Mode -I
待机 Standby
模式-II Mode -II
发送 Send
模式 Mode
接收 Reception
模式 Mode
PWR_UP=1 PWR_UP = 1
PWR_UP=0 PWR_UP = 0
TX FIFO not empty TX FIFO not empty
PRIM_RM=0 PRIM_RM = 0
CE=1 CE = 1
CE=0 CE = 0
TX FIFO empty TX FIFO empty
CE=1 CE = 1
TX FIFO not empty TX FIFO not empty
CE=1 CE = 1
PRIM_RX=0 PRIM_RX = 0
TX FIFO empty TX FIFO empty
CE=1 CE = 1
PWR_UP=0 PWR_UP = 0
PWR_UP=0 PWR_UP = 0
PRIM_RX=1 PRIM_RX = 1
CE=1 CE = 1
CE=0 CE = 0
PWR_UP=0 PWR_UP = 0
TX FIFO not empty TX FIFO not empty
CE=1 CE = 1
CE=0 CE = 0
图3 工作状态图 Figure 3 state diagram
TEL 上海:+86 021 61639330 苏州:+86 0512 86669996 http://www.panchip.com Shanghai TEL: +86 02161639330 Suzhou: +86 0512 86669996 http://www.panchip.com
版权©2012 磐启微电子 Copyright © 2012 Pan Kai Microelectronics
表3给出了XN297 5种主要的模式对应的控制寄存器参数电平和FIFO寄存器状态。 Table 3 shows the XN297 5 major mode control register corresponding parameter level FIFO register state.
表3 XN297 5种工作模式对应的控制参数配置和FIFO寄存器状态 Table 3 XN297 5 operating modes corresponding control parameter configuration and status FIFO register
模式 Mode
PWR_UP PRIM_RX PWR_UP PRIM_RX
CE CE
FIFO寄存器状态 FIFO register status
接收模式 Receive mode
1 1
1 1
1 1
- -
发送模式 Transmission mode
1 1
0 0
1 1
数据在TX FIFO寄存器中 Data in TX FIFO register
待机模式I Standby mode I
1 1
- -
0 0
无数据传输 No data transmission
待机模式II Standby Mode II
1 1
0 0
1 1
TX FIFO为空 TX FIFO is empty
休眠模式 Sleep mode
0 0
- -
- -
- -
6.1.2 休眠模式 6.1.2 Sleep Mode
在休眠模式下,XN297所有功能关闭,保持电流消耗最小。 In sleep mode, XN297 all off, keeping current consumption to a minimum. 进入休眠模式后,XN297 After entering Sleep mode, XN297
停止工作,但寄存器内容保持不变。 Stop working, but the register contents remain unchanged. 休眠模式由寄存器中PWR_UP位控制。 Sleep mode is controlled by the register PWR_UP bit.
6.1.3 待机模式-I 6.1.3 Standby mode -I
在待机模式-I下,芯片维持晶振工作而其余功能模块均关闭,并且能够在较短时间内重 -I In a standby mode, the remainder of the chip to maintain the work function of the crystal oscillator module are closed and in a relatively short time re-
新启动。 New start. 待机模式-I下消耗的平均电流较小。 Average currents in standby mode consume -I small. 在休眠模式下,通过配置寄存器的PWR_UP值 In sleep mode, the configuration register value PWR_UP
为高,芯片即可进入待机模式-I。 Is high, the chip to enter standby mode -I. 而处于发射或接收模式时,只要CE设为低芯片就会重新返 And when in the transmit or receive mode, as long as the CE chip will re-set low back
回到待机模式-I。 Return to standby mode -I.
6.1.4 待机模式-II 6.1.4 Standby mode -II
当发送端TX FIFO寄存器为空并且CE为高电平时进入待机模式II(待机模式-II通常可以 When the sender TX FIFO register is empty and CE is High enters standby mode II (standby mode -II usually
理解为预备发射模式)。 Understood as preparatory transmit mode). 此时,晶振的缓存器和电源管理模块已开启。 At this point, the crystal buffer and power management module is turned on. 在待机模式-II期间, In standby mode -II period,
寄存器配置内容保持不变。 Register configuration remain unchanged. 如果有数据包送入TX FIFO,此时PLL立刻启动工作并且待其频 If a packet is sent to TX FIFO, this time to start work immediately and wait until PLL frequency
率锁定后,发射机将数据包发射出去。 After the rate lock, the transmitter will transmit the packet out.
TEL 上海:+86 021 61639330 苏州:+86 0512 86669996 http://www.panchip.com Shanghai TEL: +86 02161639330 Suzhou: +86 0512 86669996 http://www.panchip.com
版权©2012 磐启微电子 Copyright © 2012 Pan Kai Microelectronics
6.1.5 接收模式 6.1.5 receive mode
接收模式是XN297通信时接收部分处于工作状态,当PWR_UP、PRIM-RX、CE设为高 Receive mode is in working condition when receiving part XN297 communication, when PWR_UP, PRIM-RX, CE set high
时进入接收模式。 When entering the reception mode.
在RX模式下,射频部分接收来自天线的信号,并且将其放大和下变频,解调器将模拟 In RX mode, the radio frequency portion of the received signal from the antenna, and it is amplified and down-conversion, analog demodulator
调制信号转变为数字信息,根据协议判断是否报文有效(通过匹配地址),完整有效报文才 Modulated signals into digital information, according to the agreement to determine whether the packet is valid (by matching the address), complete and effective newspaper literary talent
会进行上传。 Will be uploaded. 该包所携带的有效信息会被放在RX FIFO的空位置上。 Valid information carried by the packet is placed in an empty position in the RX FIFO. 如果RX FIFO是满的, If the RX FIFO is full,
接收的数据包就会被丢失。 Received packet will be lost.
6.1.6 发射模式 6.1.6 transmit mode
发送模式是XN297 发送数据包时发射部分处于工作状态,当PWR_UP 和CE 为高、 Transmission mode is emitting part in working condition when XN297 send packets when PWR_UP and CE is high,
PRIM-RX 为低、在发射FIFO 中存在有效数据。 PRIM-RX is low, the presence of valid data in the transmit FIFO.
XN297 在数据包发送完之前都会保持在发送模式,如果CE=0,XN297 返回到待机模 XN297 before sending the packet will remain in the transmit mode, if CE = 0, XN297 return to standby mode
式-I。 Type -I. 如果CE=1,发射FIFO 会决定下一个工作状态。 If CE = 1, transmit FIFO will determine the next state. 如果XN297 在发送模式下的TX FIFO If XN297 in transmission mode TX FIFO
不是空的,这时它会发送下一个数据包。 Is not empty, then it sends the next packet. 如果TX FIFO 是空的XN297 会进入待机模式-II。 If the TX FIFO is empty XN297 will enter standby mode -II.
当工作在发送数据模式下,XN297 发射部分的PLL 工作在开环状态。 When operating in the transmit data mode, XN297 transmit PLL working part in open-loop condition.
6.2 不同模式引脚状态 6.2 different mode pin status
关于XN297 不同工作模式I/O管脚状态详见表4。 About XN297 different modes of I / O pin status is shown in Table 4.
表4 XN297 在不同模式下的引脚状态 Table 4 XN297 pin status in different modes of
引脚名称方向 Pin Name Direction
发送模式接收模式待机模式休眠模式 Transmit mode to receive mode Standby mode Sleep mode
CE CE
输入 Input
高电平 High
高电平 High
低电平 Low
- -
CSN CSN
输入 Input
SPI片选使能,低电平使能 SPI chip select enable, enable low
SCK SCK
输入 Input
SPI时钟 SPI clock
MOSI MOSI
输入 Input
SPI串行输入 SPI Serial Input
MISO MISO
三态输出SPI串行输出 Three-state output SPI serial output
IRQ IRQ
输出 Output
中断,低电平使能 Interrupt enable low
TEL 上海:+86 021 61639330 苏州:+86 0512 86669996 http://www.panchip.com Shanghai TEL: +86 02161639330 Suzhou: +86 0512 86669996 http://www.panchip.com
版权©2012 磐启微电子 Copyright © 2012 Pan Kai Microelectronics
6.3 数据包处理方式 6.3 packet processing mode
XN297有如下几种数据包处理方式: XN297 packet processing there are several ways:
通用型通信方式; Universal means of communication;
增强型通信方式; Enhanced communication mode;
6.3.1 通用型通信模式 6.3.1 Universal communication mode
通用型通信模式下,XN297可以与普通低速MCU相连来完成通信。 Under the universal communication mode, XN297 can connect with ordinary low speed MCU to complete the communication. 高速信号处理是由 High-speed signal processing is performed by
芯片内部的协议完成的。 Chip protocol completed. XN297提供SPI接口,数据率取决于MCU本身接口速度。 XN297 provides SPI interface, data rate depends on the MCU itself interface speed. XN297 XN297
与MCU低速通信,而将高速信号处理部分放在芯片内,减少了整体方案的电流消耗。 Low-speed communication with the MCU, while the high-speed signal processing section on the chip, reducing the current consumption of the overall program. 因此, As such,
通用型通信模式下的平均电流消耗被降低。 The average current consumption of general-purpose communication mode is reduced.
在通用型通信接收模式下,当接收到有效的地址和数据时IRQ通知MCU,随后MCU可 In the universal communication receiving mode when receiving a valid address and data notified IRQ MCU, MCU can then
将接收到的数据从RX FIFO寄存器中读出。 The received data is read from RX FIFO register.
在通用型通信发送模式下,XN297自动生成前导码。 Under the universal communication transmission mode, XN297 automatically generated preamble. 数据发送完毕后IRQ通知MCU, After the data has been sent IRQ notification MCU,
减少了MCU的部分协调工作,缩减了软件开发周期。 Reduce some of the coordination of the MCU, reduce the software development cycle. XN297内部有二个不同的RX FIFO 寄 XN297 There are two different internal RX FIFO register
存器(6个通道共享此寄存器)和二个不同的TX FIFO寄存器。 Ister (6 channels share this register) and two different TX FIFO register. 在休眠模式下、待机模式下 In sleep mode, standby mode
和数据传输的过程中MCU可以随时访问FIFO寄存器。 Process and data transmission in the MCU can access the FIFO register. 允许SPI接口以低速进行数据传送,并 SPI interface allows for data transfer at low speed, and
且可以将MCU的通用I/O口用作SPI接口。 And can be generic I MCU's / O port is used as SPI interface.
6.3.2 增强型通信模式 6.3.2 enhanced communication mode
增强型通信模式可以使得双向链接协议执行起来更为容易、有效。 Enhanced mode allows two-way communication link protocol is easier to implement and effective. 典型的双向链接为: A typical two-way link is:
发送方要求终端设备在接收到数据后有应答信号,以便于发送方检测有无数据丢失。 The sender and the terminal device with the data after receiving the response signal, the sender in order to detect the presence of data loss. 一旦数 Once the number of
据丢失,则通过重传功能将丢失的数据恢复。 It is lost, then recovered by retransmission data will be lost. 增强型通信模式可以同时控制应答及重发功能 Enhanced communication mode can simultaneously control response and retransmission function
而无需增加MCU工作量。 MCU without increasing workload.
TEL 上海:+86 021 61639330 苏州:+86 0512 86669996 http://www.panchip.com Shanghai TEL: +86 02161639330 Suzhou: +86 0512 86669996 http://www.panchip.com
版权©2012 磐启微电子 Copyright © 2012 Pan Kai Microelectronics
图4 多通道数据传输网 Figure 4 multi-channel data transmission network
XN297在接收模式下可以接收6路不同通道的数据,如图4所示。 XN297 can be received in a receiving mode data to six different channels, as shown in Fig. 每一个数据通道使用 Each data channel uses
不同的地址,但是共用相同的频道。 Different address, but share the same channel. 也就是说6个不同的XN297设置为发送模式后可以与同 That six different XN297 settings for sending mode with the same
一个设置为接收模式的XN297进行通信,而设置为接收模式的XN297可以对这6个发送端进 A set XN297 receive mode to communicate, and is set to receive mode XN297 can send these six side into
行识别。 Line identification. 数据通道0是唯一的一个可以配置为40位自身地址的数据通道。 Data channel 0 is the only one can be configured as 40 own address data channel. 15 数据通道都 15 data channels
为8位自身地址和32位公用地址。 For 8 and 32 own address public address. 所有的数据通道都可以设置为增强型通信模式。 All data channels can be set to enhanced mode of communication.
XN297在确认接收到数据后记录发送端地址,并以此地址为目标地址发送应答信号。 XN297 After confirming the receipt of the data the sender address, and this address is the destination address to send the response signal.
在发送端,数据通道0被用做接收应答信号,因此,数据通道0的接收地址要与发送端地址 On the transmit side, data channel 0 is used to receive the response signal, therefore, the data channel to receive the address 0 and the sender address
相等以确保接收到正确的应答信号。 Equal to ensure that the correct answer receives the signal. 图5给出了PTX和PRX地址如何配置例子。 Figure 5 shows the PTX and PRX address how to configure the example.
图5 应答地址确定示例 Figure 5 example of determining the response address
XN297配置为增强型通信发送模式下时,只要MCU有数据要发送,XN297就会启动增 XN297 configured to enhance the next type of communication transmission mode, as long as the MCU has data to send, XN297 will start by
强型模式来发送数据,在发送完数据后XN297转到接收模式并等待终端的应答信号。 Strong type mode to send data, after sending data XN297 to receive mode and waiting for a response signal terminal. 如果 In case
TEL 上海:+86 021 61639330 苏州:+86 0512 86669996 http://www.panchip.com Shanghai TEL: +86 02161639330 Suzhou: +86 0512 86669996 http://www.panchip.com
版权©2012 磐启微电子 Copyright © 2012 Pan Kai Microelectronics
没有在规定时间内收到正确的应答信号,XN297 将重发相同的数据包,直到收到应答信号 Not received within the specified time correct answer signal, XN297 will retransmit the same packet until it receives a response signal
或传输次数超过SETUP_RETR_ARC寄存器中设置的值为止,如果传输次数超过了设定值, Or the number of transfers exceeds the value set in the register until SETUP_RETR_ARC, if the transmission frequency exceeds the set value,
会产生MAX_RT中断。 Will produce MAX_RT interrupt.
只要收到确认信号,XN297就认为最后一包数据已经发送成功(接收方已经收到数据), As long as acknowledgment is received, XN297 would think the last one packet of data has been transmitted successfully (the receiver has received data)
把TX FIFO中的数据清除并产生TX_DS中断(IRQ 引脚置高)。 TX FIFO data in clear and generate TX_DS interrupt (IRQ pin high).
在增强型通信模式下,XN297有如下的特征: In the enhanced communication mode, XN297 has the following characteristics:
低功耗,快速启动即自动空中传输,极大的降低了电流消耗。 Low power consumption, quick start automatically air transmission, greatly reducing the current consumption.
少量外部控制,XN297集成了所有高速链路层操作,比如:重传丢失的数据包和 A small amount of external control, XN297 integrates all the high-speed link layer operations, such as: retransmit lost packets and
产生自动应答信号。 Generate automatic response signal. SPI接口可以利用单片机通用I/O口进行通信。 SPI interface can use general-purpose MCU I / O port for communication.
快速传输,空中传输时间较短,极大地降低了无线传输中的信号碰撞现象。 Fast transmission, air transport time is shorter, which greatly reduces the wireless transmission of signals collision phenomenon.
开发周期短,芯片链路层完全内部集成,非常便于软硬件的开发。 Short development cycle, chip link layer is completely integrated, very easy to hardware and software development.
6.3.3 增强型通信发送模式 6.3.3 Enhanced communication transmission mode
1、配置寄存器位PRIM_RX 为低; A configuration register bit PRIM_RX low;
2、当MCU有数据要发送时,接收节点地址(TX_ADDR)和有效数据(TX_PLD)通过SPI 2, when the MCU has data to send, the receiving node address (TX_ADDR) and valid data (TX_PLD) via SPI
接口写入XN297。 Interface written XN297. 发送数据的长度以字节计数从MCU写入TX FIFO。 Send data length in bytes written from the MCU TX FIFO. 当CSN为低时,数据 When the CSN is low, the data
被不断的写入。 Has been continuously written. 发送端发送完数据后,将通道0设置为接收模式来接收应答信号,其接收地 After the sender sends the data, the channel 0 is set to receive mode to receive a response signal, which is received in
址(RX_ADDR_P0)与接收端地址(TX_ADDR)相同。 Address (RX_ADDR_P0) and receiver address (TX_ADDR) the same. 例:在图5中数据通道5的发送端(PTX5) Example: In Figure 5, the end of data sent over the channel 5 (PTX5)
及接收端(RX)地址设置如下: And the receiver (RX) address set as follows:
TX5:TX_ADDR=0XC2C3C4C5C1 TX5: TX_ADDR = 0XC2C3C4C5C1
TX5:RX_ADDR_P0=0XC2C3C4C5C1 TX5: RX_ADDR_P0 = 0XC2C3C4C5C1
RX: RX_ADDR_P5=0XC2C3C4C5C1 RX: RX_ADDR_P5 = 0XC2C3C4C5C1
3、设置CE为高,启动发射。 3, set the CE is high, start launch.
4、增强型通信模式特点: 4, enhanced communication mode features:
自动切换工作模式; Automatically switches the operating mode;
启动内部16MHz时钟; Start the internal 16MHz clock;
自动数据打包并发送; Automatic Data packaged and sent;
高传输数据率(由MCU设定为1Mbps或2Mbps)。 High transmission data rate (set by the MCU 1Mbps or 2Mbps).
5、如果启动了自动应答模式(自动传输计数器不等于0,ENAA_P0 =1),XN297立 5, if you start the automatic answer mode (automatic transmission counter is not equal to 0, ENAA_P0 = 1), XN297 legislation
TEL 上海:+86 021 61639330 苏州:+86 0512 86669996 http://www.panchip.com Shanghai TEL: +86 02161639330 Suzhou: +86 0512 86669996 http://www.panchip.com
版权©2012 磐启微电子 Copyright © 2012 Pan Kai Microelectronics
即进入接收模式。 That goes into receive mode. 如果在有效应答时间范围内收到应答信号,则认为数据成功发送到了接收 If you receive an acknowledgment signal response time within the effective range, then that data is successfully sent to the receiving
端,此时状态寄存器的TX_DS位置高并把数据从TX FIFO中清除掉。 End, this time TX_DS high position in the status register and the data removed from the TX FIFO. 如果在设定时间范围内 If, within the set time frame
没有接收到应答信号,则重新发送数据。 Does not receive a response signal, then resend the data. 如果自动传输计数器(ARC_CNT)溢出(超过了 If the automatic transmission counter (ARC_CNT) overflow (exceeding the
编程设定的值),则状态寄存器的MAX_RT 位置高,不清除TX FIFO中的数据。 High MAX_RT position programmed value), the status register does not clear the data in the TX FIFO. 当MAX_RT When MAX_RT
或TX_DS为高电平时IRQ 引脚产生中断。 Or TX_DS is high IRQ pin interrupt is generated. IRQ中断通过写状态寄存器来复位。 IRQ interrupt status register by writing to reset. 如果传输次数 If the number of transfers
在达到设定的最大传输次数时还没有收到应答信号的话,在MAX_RX中断清除之前不会重发 Did not receive the response signal reaches the set maximum number of transmissions Shihai, then cleared before the interrupt will not be retransmitted MAX_RX
数据包。 Packet. 数据包丢失计数器(PLOS_CNT)在每次产生MAX_RT中断后加一。 Packet loss counter (PLOS_CNT) each generate an interrupt after MAX_RT plus one. 也就是说:重发 In other words: retransmission
计数器ARC_CNT计算重发数据包次数,PLOS_CNT计算在达到最大允许传输次数时仍没有 Counter ARC_CNT packet retransmission number is calculated, PLOS_CNT calculate the maximum allowable number of transmission is still not
发送成功的数据包个数。 Number of packets sent successfully.
6、如果CE置低,则系统进入待机模式-I。 6, if the CE is set low, the system goes into standby mode -I. 如果不设置CE为低,则系统会发送TX FIFO 寄 If you do not set the CE is low, the system will send TX FIFO register
存器中下一包数据。 Ister in the next packet data. 如果TX FIFO寄存器为空并且CE为高则系统进入待机模式II。 If the TX FIFO register is empty and CE is high, the system goes into standby mode II.
7、如果系统在待机模式II,当CE置低后系统立即进入待机模式-I。 7, if the system is in standby mode II, when CE is set low immediately after the system goes into standby mode -I.
6.3.4 增强型通信接收模式 6.3.4 Enhanced communication receive mode
1、增强型通信接收模式是通过设置寄存器中PRIM_RX位为高来选择的。 1, enhanced communication receive mode is enabled by setting register PRIM_RX bits to select the high. 准备接收数据 Ready to receive data
的通道必须被使能(EN_RXADDR 寄存器),所有工作在增强型通信模式下的数据通道的 The channel must be enabled (EN_RXADDR register), all work under the enhanced mode of communication data channel
自动应答功能是由(EN_AA寄存器)来使能的,有效数据宽度是由RX_PW_PX寄存器来设置 Auto Answer function is performed by (EN_AA register) to enable effective data width is set by RX_PW_PX register
的。 The.
2、接收模式由设置CE为高启动。 2, the receiving mode by setting CE high boot.
3、预设的等待时间后,XN297开始检测无线信号。 3, after the preset wait time, XN297 starts to detect the wireless signal.
4、接收到有效的数据包后(地址匹配),数据存储在RX_FIFO中,同时RX_DR位置高, 4, after a valid packet is received (the addresses match) in RX_FIFO while RX_DR high data storage location,
并产生中断。 And generates an interrupt. 状态寄存器中RX_P_NO位显示数据是由哪个通道接收到的。 Status register RX_P_NO bit display data is received by which channel to.
5、如果使能自动确认信号,则发送确认信号。 5, if enabled automatic confirmation signal, then send a confirmation signal.
6、MCU设置CE脚为低,进入待机模式-I。 6, MCU setting CE pin is low, go into standby mode -I.
7、MCU将数据以合适的速率通过SPI口将数据读出。 7, MCU data to the appropriate rate will read out the data through the SPI port.
8、芯片准备好进入发送模式、接收模式或休眠模式。 8, the chip is ready to enter the transmit mode, receive mode or hibernation mode.
TEL 上海:+86 021 61639330 苏州:+86 0512 86669996 http://www.panchip.com Shanghai TEL: +86 02161639330 Suzhou: +86 0512 86669996 http://www.panchip.com
版权©2012 磐启微电子 Copyright © 2012 Pan Kai Microelectronics
6.3.5 双向数据通信方式 6.3.5 Bi-directional data communication
如果需要数据能双向通信,PRIM_RX寄存器必须紧随芯片工作模式的变化而变化。 If you need data can be two-way communication, PRIM_RX register must be followed by changes in work patterns and changes in the chip. 处 Department
理器必须保证PTX和PRX端的同步性。 Manager must ensure that PTX and PRX end synchronization. 在RX_FIFO和TX_FIFO寄存器中可能同时存有数据。 Data may also exist in RX_FIFO and TX_FIFO register.
1、自动应答(RX): An automatic response (RX):
自动应答功能可以通过SPI口对不同的数据通道分别进行配置。 Auto Answer feature can be configured via the SPI port to different data channels respectively.
收到有效的数据包后,系统将进入发送模式并发送确认信号。 Upon receipt of a valid data packet, the system will go into transmit mode and send a confirmation signal. 发送完确认信号后,系统进入 After sending a confirmation signal, the system enters
正常工作模式(工作模式由PRIM_RX位和CE引脚决定)。 Normal operating mode (operating mode by PRIM_RX bit and CE pins decision).
2、自动传输功能(ART)、(TX): 2, the automatic transmission function (ART), (TX):
自动传输功能是针对自动应答系统的发送方。 Automatic transmission function is the sender for the automatic answering system. SETUP_RETR 寄存器设置:启动重发数 SETUP_RETR register settings: Start retransmission number
据的时间长度。 According to the length of time. 在每次发送结束后系统都会进入接收模式并在设定的时间范围内等待应答信 After each end of the system will be sent into receive mode and within the time frame set waits for a reply letter
号。 Number. 接收到应答信号后,系统转入正常发送模式。 After receiving the response signal, the system into normal transmission mode. 如果TX FIFO中没有待发送的数据且CE If the TX FIFO is no data to be transmitted and CE
脚电平为低,则系统将进入待机模式-I。 Foot level is low, the system will enter standby mode -I. 如果没有收到确认信号,则系统返回到发送模式并 If you do not receive a confirmation signal, the system returns to the transmit mode and
重发数据直到收到确认信号或重发次数超过设定值(达到最大的重发次数)有新的数据发送 Retransmit data until it receives an acknowledgment signal or the number of retransmissions exceeds a set value (up to the maximum number of retransmissions) there is a new data transmission
或PRIM_RX寄存器配置改变时丢包计数器复位。 Loss or PRIM_RX register counter is reset when the configuration changes.
6.3.6 增强型通信模式下的数据包识别 A packet identifier 6.3.6 enhanced communication mode
每一包数据都包括两位的PID(数据包识别)来识别接收的数据是新数据包还是重发的 Each data packet includes two of the PID (packet identifier) to identify the received data is a new packet or a retransmission of
数据包。 Packet. PID识别可以防止接收端同一数据包多次送入MCU。 PID to identify the receiving end can be prevented from repeatedly into the same packet MCU. 在发送方每从MCU取得一包 Each MCU a packet obtained from the sender
新数据后PID值加一。 After the new data PID value plus one. PID应用在接收方识别接收的数据是重发的数据包还是新数据包。 PID application data received by the receiving party identification is retransmitted packet or a new packet. 如 As
果在链接中有一些数据丢失了,则PID值与上一包数据的PID值相同。 If there are some data loss in the link, the PID value of the PID of a packet data value is the same.
1、接收方: 1, the receiver:
接收方对新接收数据包的PID值与上一包进行比较。 The receiver receives the data packets to the new PID value of the comparison with the previous packet. 如果PID值不同,则认为接收的数据 If the PID values are different, the received data
包是新数据包。 Packet is a new data packet. 如果PID值与上一包相同,则新接收的数据包有可能与前一包相同。 If the PID value is the same as the previous packet, the new received data packets may be the same as the previous packet.
2、发送方: 2, the transmission side:
每发送一包新的数据则发送方的PID值加一。 Each sends a new data packet the PID values of the sender plus one.
TEL 上海:+86 021 61639330 苏州:+86 0512 86669996 http://www.panchip.com Shanghai TEL: +86 02161639330 Suzhou: +86 0512 86669996 http://www.panchip.com
版权©2012 磐启微电子 Copyright © 2012 Pan Kai Microelectronics
开始 Begin
增加PID Increase PID
结束 End
是否有 Are there
新包来自 The new package from
MCU ? MCU?
是 Yes
否 No
开始 Begin
新包在MCU中 The new package in the MCU
有效 Effective
结束 End
丢失包被复制 Lost packets are copied
PTX端功能 PTX-side functionality
PRX端功能 PRX-side functionality
PID是否 Whether PID
等于上一 On an equal
个PID? A PID?
是 Yes
否 No
否 No
CRC是否 CRC whether
等于上一 On an equal
个CRC ? A CRC?
是 Yes
图6 PID生成和检测 Figure 6 PID generation and detection
6.4 数据通道 6.4 Data Channel
XN297配置为接收模式时可以接收6路不同地址相同频率的数据。 You can receive six different addresses at the same frequency channel data when XN297 configured to receive mode. 每个数据通道拥有自 Each data channel has since
己的地址并且可以通过寄存器来进行分别配置。 Own address and that can be configured via the register, respectively.
数据通道是通过寄存器EN_RXADDR来设置的,默认状态下只有数据通道0和数据通道 EN_RXADDR data channel is set through the register, and only the default data channel and the data channel 0
1是开启状态的。 1 is an opened state.
每一个数据通道的地址是通过寄存器RX_ADDR_PX来配置的。 Address of each data channel is configured by the register RX_ADDR_PX. 通常情况下不允许不同 Under normal circumstances do not allow different
的数据通道设置完全相同的地址。 The same data channel setting address. 表5给出了各通道地址配置示例。 Table 5 gives the address of each channel configuration examples.
表5 多通道地址设置 Table 5 multi-channel address set
BYTE 4 BYTE 4
BYTE 3 BYTE 3
BYTE 2 BYTE 2
BYTE 1 BYTE 1
BYTE 0 BYTE 0
Data pipe 0(RX_ADDR_P0) Data pipe 0 (RX_ADDR_P0)
0xF1 0xF1
0xD2 0xD2
0xE6 0xE6
0xA2 0xA2
0x33 0x33
Data pipe 1(RX_ADDR_P1) Data pipe 1 (RX_ADDR_P1)
0xD3 0xD3
0xD3 0xD3
0xD3 0xD3
0xD3 0xD3
0xD3 0xD3
↓ ↓
↓ ↓
↓ ↓
↓ ↓
Data pipe 2(RX_ADDR_P2) Data pipe 2 (RX_ADDR_P2)
0xD3 0xD3
0xD3 0xD3
0xD3 0xD3
0xD3 0xD3
0xD4 0xD4
↓ ↓
↓ ↓
↓ ↓
↓ ↓
Data pipe 3(RX_ADDR_P3) Data pipe 3 (RX_ADDR_P3)
0xD3 0xD3
0xD3 0xD3
0xD3 0xD3
0xD3 0xD3
0xD5 0xD5
↓ ↓
↓ ↓
↓ ↓
↓ ↓
Data pipe 4(RX_ADDR_P4) Data pipe 4 (RX_ADDR_P4)
0xD3 0xD3
0xD3 0xD3
0xD3 0xD3
0xD3 0xD3
0xD6 0xD6
↓ ↓
↓ ↓
↓ ↓
↓ ↓
Data pipe 5(RX_ADDR_P5) Data pipe 5 (RX_ADDR_P5)
0xD3 0xD3
0xD3 0xD3
0xD3 0xD3
0xD3 0xD3
0xD7 0xD7
TEL 上海:+86 021 61639330 苏州:+86 0512 86669996 http://www.panchip.com Shanghai TEL: +86 02161639330 Suzhou: +86 0512 86669996 http://www.panchip.com
版权©2012 磐启微电子 Copyright © 2012 Pan Kai Microelectronics
从表5可以看出数据通道0 5byte 总共40位的地址都是可配的;数据通道15的地址配 As can be seen from Table 5, the data channel 0 5byte total of 40 addresses are available with the; address with 15 data channels
置为32位共用地址+各自的地址(最低字节)。 Shared address set to 32 + each address (least significant byte).
上表通道05的地址设置当从一个数据通道中接收到数据,并且此数据通道设置为应答 Channel address set on the table 05 when receiving data from one channel to the data, and the data channel is set to answer
方式的话,则XN297在收到数据后产生应答信号,此应答信号的目标地址为接收通道地址。 Way, then XN297 generate an acknowledge after receiving the data, the response signal of the target address to receive the channel address.
TEL 上海:+86 021 61639330 苏州:+86 0512 86669996 http://www.panchip.com Shanghai TEL: +86 02161639330 Suzhou: +86 0512 86669996 http://www.panchip.com
版权©2012 磐启微电子 Copyright © 2012 Pan Kai Microelectronics
7.数据和控制接口 Data and control interface 7
XN297所有配置都在配置寄存器中,所有寄存器都是通过SPI口读写进行操作。 XN297 all configurations in the configuration register, all registers are operated via the SPI port to read and write.
7.1 SPI 接口 7.1 SPI Interface
SPI接口是标准的SPI接口,其最大的数据传输率为8Mbps。 SPI interface is a standard SPI interface, the maximum data transfer rate of 8Mbps. 大多数寄存器具有读写功 Most registers have read and write functions
能。 Energy.
7.2 SPI 指令设置 7.2 SPI instruction set
SPI接口用到的指令在7.3节有所说明。 SPI interface commands used in 7.3 has been described. CSN为低后SPI接口等待执行指令。 CSN is low after the SPI interface waits to execute instructions. 每一条指令 Each instruction
的执行都必须通过一次CSN由高到低的变化。 Have to be performed through a change from high to low CSN.
7.3 SPI 指令格式 7.3 SPI instruction format
表6 SPI 指令格式 Table 6 SPI instruction format
<命令字:由高位到低位(每字节)> <Command word: from high to low (per byte)>
<数据字节:低字节到高字节,每一字节高位在前> <Data byte: low byte to high byte, each byte MSB first>
命令名称 Command name
命令字 Command word
(二进制) (Binary)
数据字节 Data Bytes
操作 Operation
R_REGISTER R_REGISTER
000A AAAA 1 to 5 低字 000A AAAA 1 to 5 low word
节在前 The front section
读命令寄存器和状态寄存器 Read command and status registers
AAAAA=5bit 寄存器地址 AAAAA = 5bit register address
W_REGISTER W_REGISTER
001A AAAA 1 to 5 低字 001A AAAA 1 to 5 low word
节在前 The front section
写命令寄存器和状态寄存器 Write command and status registers
AAAAA=5bit 寄存器地址 AAAAA = 5bit register address
仅在power_down 和standby 模 Only power_down and standby mode
式写可执行 Write-executable
R_RX_PAYLOAD R_RX_PAYLOAD
0110 0001 01100001
1 to 64 低字 1 to 64 low word
节在前 The front section
读接收数据,读操作通常由第0 字 Read the received data, a read operation is usually by word 0
节开始。 Festival begins. 读完过后数据将被从 After reading the data will be from
FIFO 中删除。 FIFO deleted. 接收模式可用 Receive Mode Available
W_TX_PAYLOAD W_TX_PAYLOAD
1010 0000 1010 0000
1 to 64 低字写发射数据,写操作通常由0 字节 1 to 64 low-word write transmit data write operation is usually from 0 bytes
TEL 上海:+86 021 61639330 苏州:+86 0512 86669996 http://www.panchip.com Shanghai TEL: +86 02161639330 Suzhou: +86 0512 86669996 http://www.panchip.com
版权©2012 磐启微电子 Copyright © 2012 Pan Kai Microelectronics
节在前 The front section
开始。 Begin.
发射模式中可用 Available in the transmit mode
FLUSH_TX FLUSH_TX
1110 0001 11100001
0 0
清Tx_FIFO, Tx 模式中可用 Qing Tx_FIFO, Tx mode available
FLUSH_RX FLUSH_RX
1110 0010 11100010
0 0
清Rx_FIFO, Rx 模式中可用。 Qing Rx_FIFO, Rx modes are available. 在回 In the back
传应答时不可执行,否则会使应答 When answering pass unenforceable, otherwise it would reply
数据不完整 Incomplete data
REUSE_TX_PL REUSE_TX_PL
1110 0011 11100011
0 0
用在PTX 模式芯片 PTX mode chip used in
重用最后传送的数据。 Finally reuse data transfer. 当CE 为高 When CE is high
时数据将被一直重复使用。 When data is to be repeated use. 重用 Reuse
Tx 数据在W_REGISTER , Tx data W_REGISTER,
FLUSH_TX 命令执行后可用。 FLUSH_TX command execution available.
数据传输时该命令不能被执行 When the data transfer of the command can not be executed
ACTIVATE ACTIVATE
0101 0000 01010000
1 1
用命令后跟数据0x73,将激活以 Command followed by data 0x73, will be activated to
下功能 Under the function
• R_RX_PL_WID • R_RX_PL_WID
• W_ACK_PAYLOAD • W_ACK_PAYLOAD
• W_TX_PAYLOAD_NOACK • W_TX_PAYLOAD_NOACK
再次使用该命令后跟同样数据,将 Use the command again followed the same data,
关闭上述功能。 Close the above functions. 该命令仅在 This command only
power_down 和standby 模式写 power_down and standby mode to write
可执行。 Executables.
R_RX_PL_WID R_RX_PL_WID
0110 0000 01100000
读Rx_FIFO 最顶部RX-payload Reading Rx_FIFO top of RX-payload
数据宽度 Data Width
W_ACK_PAYLOAD W_ACK_PAYLOAD
1010 1PPP 1010 1PPP
1 to 64 1 to 64
低字节在前 Endian
Rx 模式可用 Rx modes are available
写PIPE PPP(PPP 的值从000 到 Write PIPE PPP (PPP values from 000 to
101)响应ACK 时同时回传的数 101) while the number of ACK response backhaul
据。 It is. 最多可设置3 个ACK 数据包。 You can set up three ACK packet.
同PIPE 的数据将以先进先出的原 PIPE's will FIFO data with original
则发送。 Is sent.
写操作通常从0 字节开始。 Write operation usually starts from 0 bytes.
W_TX_PAYLOAD_NO W_TX_PAYLOAD_NO
ACK ACK
1011 0000 10110000
1 to 64 1 to 64
低字节在前 Endian
Tx 模式中可用 Tx mode available
使用该命令发送数据将使 Will use the command to send data
AUTOACK 不可用 AUTOACK unavailable
NOP NOP
1111 1111 1111 1111
0 0
无操作。 No action. 可用于读状态寄存器 Can be used to read the status register
R_REGISTER 和W_REGISTER 寄存器可能操作单字节或多字节寄存器。 R_REGISTER and W_REGISTER register may operate one or more bytes register. 当访问多字节寄 When accessing multi-byte register
TEL 上海:+86 021 61639330 苏州:+86 0512 86669996 http://www.panchip.com Shanghai TEL: +86 02161639330 Suzhou: +86 0512 86669996 http://www.panchip.com
版权©2012 磐启微电子 Copyright © 2012 Pan Kai Microelectronics
存器时首先要读/写的是最低字节的高位。 When the memory is the first to read / write is the lowest byte high. 在所有多字节寄存器被写完之前可以结束写SPI Before all multi-byte registers are written can end write SPI
操作,在这种情况下没有写完的高字节保持原有内容不变。 Operation, in this case did not finish high byte holds the original content intact. 例如:RX_ADDR_P0 寄存器的 For example: RX_ADDR_P0 register
最低字节可以通过写一个字节给寄存器RX_ADDR_P0 来改变。 Low byte can be changed by writing a byte to register RX_ADDR_P0. 在CSN 状态由高变低后可 In CSN status can be changed from low to high
以通过MISO 来读取状态寄存器的内容。 MISO to read through the contents of the status register.
7.4 中断 7.4 Interrupt
XN297的中断引脚(IRQ)为低电平触发,当状态寄存器中TX_DS、RX_DR或MAX_RT XN297 interrupt pin (IRQ) is low triggered when the status register TX_DS, RX_DR or MAX_RT
为高时触发中断。 To trigger an interrupt high. 当MCU给中断源写'1'时,中断引脚被禁止。 When the MCU interrupt sources to write 'a', the interrupt pin is disabled. 可屏蔽中断可以被IRQ中 Maskable interrupts can be the IRQ
断屏蔽。 Broken shield. 通过设置可屏蔽中断位为高,则中断响应被禁止。 By setting maskable interrupt bit is high, the interrupt is disabled. 默认状态下所有的中断源是被禁 All interrupt sources are disabled by default
止的。 Ended.
7.5 SPI 时序 7.5 SPI Timing
图7 SPI读操作 Figure 7 SPI read
图8 SPI写操作 Figure 8 SPI write operation
TEL 上海:+86 021 61639330 苏州:+86 0512 86669996 http://www.panchip.com Shanghai TEL: +86 02161639330 Suzhou: +86 0512 86669996 http://www.panchip.com
版权©2012 磐启微电子 Copyright © 2012 Pan Kai Microelectronics
图9 SPI ,NOP操作时序图 Figure 9 SPI, NOP operation timing diagram
表7 SPI参考时间 Table 7 SPI reference time
SYMBOL SYMBOL
PARAMETERS PARAMETERS
MIN MIN
MAX MAX
UNITS UNITS
Tdc Tdc
数据建立时间 Data setup time
15 15
ns ns
Tdh Tdh
数据保持时间 Data Hold Time
2 2
ns ns
Tcsd Tcsd
CSN信号有效时间 CSN signal the effective time
40 40
ns ns
Tcd Tcd
SCK信号有效时间 SCK signal the effective time
51 51
ns ns
Tcl Tcl
SCK信号低电平时间 SCK signal low time
38 38
ns ns
Tch Tch
SCK信号高电平时间 SCK signal is high time
38 38
ns ns
Fsck Fsck
SCK信号频率 SCK signal frequency
0 0
8 8
MHz MHz
Tr,Tf Tr, Tf
SCK信号上升下降时间 SCK signal rise and fall time
110 110
ns ns
Tcc Tcc
CSN信号建立时间 CSN signal setup time
2 2
ns ns
Tcch Tcch
CSN信号保持时间 CSN signal hold time
2 2
ns ns
Tcwh Tcwh
CSN无效时间 CSN invalid time
49 49
ns ns
Tcdz Tcdz
CSN信号高阻抗 CSN high impedance signal
40 40
ns ns
注:表7的参数可根据选择的MCU调整 Note: The parameter table 7 can be adjusted according to the selected MCU
图79和表7给出了SPI操作及时序。 Figure 79 and Table 7 shows the SPI operation and timing. 在写寄存器之前一定要进入待机模式或休眠模式。 Before writing the register must enter standby mode or hibernation mode.
在图中用到了下面的符号: The following symbols used in the drawings in which:
i i
C C
-SPI指令位 -SPI Instruction bits
i i
S S
-状态寄存器位 - Status register bits
i i
D D
-数据位(备注:由低字节到高字节,每个字节中高位在前) - Data bit (Note: the low byte to high byte, each byte MSB first)
注: Note:
n n
3 3
2 2
1 1
… ...
… ...
= =
、 ,
、 ,
i i
。 .
TEL 上海:+86 021 61639330 苏州:+86 0512 86669996 http://www.panchip.com Shanghai TEL: +86 02161639330 Suzhou: +86 0512 86669996 http://www.panchip.com
版权©2012 磐启微电子 Copyright © 2012 Pan Kai Microelectronics
7.6 控制寄存器 7.6 Control Registers
可以通过SPI 读写操作表8 中的寄存器来配置和控制XN297。 XN297 can be configured and controlled via SPI read and write operations table eight registers. 表8 中未定义的为无用 As defined in Table 8 unwanted
寄存器,读出来的结果为“0”。 Registers, to read out the result is "0."
表8 控制寄存器 Table 8 Control Register
地址 Address
(HEX) (HEX)
存储器 Memory
BIT BIT
默认值 The default value
(19/1E/1F (19 / 1E / 1F
寄存器为推 Register for push
荐值) Recommended value)
读写 Read
说明 Description
00 00
CONFIG CONFIG
工作寄存器 Working register
DATAOUT_S DATAOUT_S
EL EL
7 7
0 0
R/W 数据读取选择位 R / W data read select bit
1: 使得地址0X09 的bit7:1 的输 1: making the address 0X09's bit7: lose one's
出为Analog_data 的bit6:0 Out for Analog_data of bit6: 0
0: 使得地址0X09 的bit7:0 的输 0: making the address 0X09's bit7: lost 0
出为接收机实时给出的4位RSSI RSSI of the receiver 4 is given in real time
数据+数据包同步时的接收机4 Receiver synchronization packet data + 4
位RSSI 数据 Bit RSSI data
MASK_RX_D MASK_RX_D
R R
6 6
0 0
R/W 接收数据成功的中断上报使能位 Successful interrupt R / W enable bit receive data reporting
1: 中断不反映到IRQ pin 1: Interrupt not reflected in the IRQ pin
0: RX_DR 中断反映到IRQ pin 0: RX_DR reflect the IRQ pin interrupt
MASK_TX_D MASK_TX_D
S S
5 5
0 0
R/W 发送数据成功的中断上报使能位 Successful interrupt R / W Transmit data reporting enable bit
1: 中断不反映到IRQ pin 1: Interrupt not reflected in the IRQ pin
0: TX_DS 中断反映到IRQ pin 0: TX_DS reflect the IRQ pin interrupt
MASK_MAX_ MASK_MAX_
RT RT
4 4
0 0
R/W 达到最大传输次数的中断上报使 R / W reaches a maximum transmission number of the interrupt enable reporting
能位 Bit
1: 中断不反映到IRQ pin 1: Interrupt not reflected in the IRQ pin
0: MAX_RT 中断反映到IRQ pin 0: MAX_RT reflect the IRQ pin interrupt
EN_CRC EN_CRC
3 3
1 1
R/W CRC 使能位 R / W CRC Enable bit
1: CRC 使能,2byte 1: CRC enabled, 2byte
0: CRC 不使能,并且不判CRC 0: CRC not enabled, and no sentence CRC
校验 Check
N/A N / A
2 2
0 0
R/W 保留 R / W reserved.
PWR_UP PWR_UP
1 1
0 0
R/W 芯片使能位 R / W chip enable bit
1: POWER_UP 1: POWER_UP
TEL 上海:+86 021 61639330 苏州:+86 0512 86669996 http://www.panchip.com Shanghai TEL: +86 02161639330 Suzhou: +86 0512 86669996 http://www.panchip.com
版权©2012 磐启微电子 Copyright © 2012 Pan Kai Microelectronics
0: POWER_DOWN 0: POWER_DOWN
PRIM_RX PRIM_RX
0 0
0 0
R/W RX/TX 控制 R / W RX / TX Control
1: PRX 1: PRX
0: PTX 0: PTX
01 01
EN_AA EN_AA
Enhanced Enhanced
Burst Burst
自动应答使能 Enable Auto Answer
Reserved Reserved
7:6 7: 6
00 00
R/W Only 00 allowed R / W Only 00 allowed
ENAA_P5 ENAA_P5
5 5
0 0
R/W 使能pipe5 自动应答 R / W Enable automatic answering pipe5
ENAA_P4 ENAA_P4
4 4
0 0
R/W 使能pipe4 自动应答 R / W Enable automatic answering pipe4
ENAA_P3 ENAA_P3
3 3
0 0
R/W 使能pipe3 自动应答 R / W Enable automatic answering pipe3
ENAA_P2 ENAA_P2
2 2
0 0
R/W 使能pipe2 自动应答 R / W Enable automatic answering pipe2
ENAA_P1 ENAA_P1
1 1
0 0
R/W 使能pipe1 自动应答 R / W Enable automatic answering pipe1
ENAA_P0 ENAA_P0
0 0
0 0
R/W 使能pipe0 自动应答 R / W Enable automatic answering pipe0
02 02
EN_RXADDR EN_RXADDR
RX 地址使能 RX Address Enable
Reserved Reserved
7:6 7: 6
00 00
R/W Only 00 allowed R / W Only 00 allowed
ERX_P5 ERX_P5
5 5
0 0
R/W 使能data pipe 5 R / W Enable data pipe 5
ERX_P4 ERX_P4
4 4
0 0
R/W 使能data pipe 4 R / W Enable data pipe 4
ERX_P3 ERX_P3
3 3
0 0
R/W 使能data pipe 3 R / W Enable data pipe 3
ERX_P2 ERX_P2
2 2
0 0
R/W 使能data pipe 2 R / W Enable data pipe 2
ERX_P1 ERX_P1
1 1
1 1
R/W 使能data pipe 1 R / W Enable data pipe 1
ERX_P0 ERX_P0
0 0
1 1
R/W 使能data pipe 0 R / W Enable data pipe 0
03 03
SETUP_AW SETUP_AW
地址宽度设置 Address width setting
Reserved Reserved
7:2 7: 2
00 00
R/W Only 000000 allowed R / W Only 000000 allowed
AW AW
1:0 1: 0
11 11
R/W RX/TX 地址宽度 R / W RX / TX address width
00:无效 00: Invalid
01: 3 字节 01: 3 bytes
10: 4 字节 10: 4 bytes
11: 5 字节 11: 4 bytes
如果地址宽度设置低于5 字节, If the address width is set less than 5 bytes,
接收地址将使用低字节 Address will be used to receive low byte
04 04
SETUP_RETR SETUP_RETR
自动重传设置 Automatic retransmission settings
ARD ARD
7:4 7: 4
0000 0000
R/W 自动重传延时 R / W automatic retransmission delay
0000 :250µs 0000: 250μs
0001 :500µs 0001: 500μs
TEL 上海:+86 021 61639330 苏州:+86 0512 86669996 http://www.panchip.com Shanghai TEL: +86 02161639330 Suzhou: +86 0512 86669996 http://www.panchip.com
版权©2012 磐启微电子 Copyright © 2012 Pan Kai Microelectronics
0010 :750µs 0010: 750μs
…… ......
1111: 4000µs 1111: 4000μs
ARC ARC
3:0 3: 0
0011 0011
R/W 自动重传的传输次数设置
0000: 普通通信模式
0001: 增强型模式1 次传输
…… ......
1111: 增强型模式15 次传输
05 05
RF_CH
通信频道设置
Reserved Reserved
7 7
0 0
R/W Only 0 allowed
RF_CH
6:0
0000010
R/W 设置使用频道为
Channel=RF_CH + 2400
06 06
RF_SETUP
通信通道配置
RSSI_EN
7 7
0 0
R/W RSSI 使能位
1: RSSI 使能
0: RSSI 不使能
Reserved Reserved
6 6
0 0
R/W Only 0 allowed
RSSI_SEL
5 5
0 0
R/W RSSI 数据选择方式
1: 采样信号数据经过滤波器
0: 采样信号数据不经过滤波器
Reserved Reserved
4 4
0 0
R/W Only 0 allowed
RF_DR
3 3
1 1
R/W 数据速率
0: 1Mbps
1: 2Mbps
RF_PWR
2:1
11 11
(推荐值10)
R/W 设置RF 输出功率
00: -10dBm
01: 0dBm
10: 8dBm
11: 最大输出功率10dBm
LNA_HCURR
0 0
1 1
R/W 设置LNA 高电流使能
1: 高电流
0: 低电流
07 07
STATUS
状态寄存器
Reserved Reserved
7 7
0 0
R/W Only 0 allowed
RX_DR
6 6
0 0
R/W RX FIFO 接收数据中断,
TEL 上海:+86 021 61639330 苏州:+86 0512 86669996 http://www.panchip.com
版权©2012 磐启微电子
在新数据被接收到达RX FIFO 时
产生中断。
写1 清中断
TX_DS
5 5
0 0
R/W TX FIFO 发送数据中断,
在数据发送完成后产生中断。
当使能AUTO_ACK 时,仅在收
到ACK 信号后才会将该位置高。
写1 清中断
MAX_RT
4 4
0 0
R/W 达到最大传输次数产生中断。
写1 清中断
如果产生该中断,必须清该中断
后可继续进行通信
RX_P_NO
3:1
111 111
R R
可从RX_FIFO 读取的pipe 号
000-101: pipe 号
110: Not Used
111: RX_FIFO 空
TX_FULL
0 0
0 0
R R
TX FIFO 满标志
1: TX FIFO 满
0: TX FIFO 未满可用
08 08
OBSERVE_TX
传输状态寄存器
PLOS_CNT
7:4
0 0
R R
丢包计数器
该计数器达到最大值15 时将停
止计数,直到复位,未复位该值
时可继续进行通信。
该计数器在写RF_CH 时被复位
ARC_CNT
3:0
0 0
R R
增强型通信的重传次数计数器。
与ARC 寄存器配合使用。每次达
到重传次数限制值时,会视为丢
包,并将PLOS_CNT 加1。
当新数据写入TX FIFO 时该计数
器复位。
重传次数=传输次数- 1
09 09
DATAOUT
7:0
00000000
R R
数据读取寄存器
当DATAOUT_SEL 为
1 时,
bit7:1的输出为Analog_data寄
TEL 上海:+86 021 61639330 苏州:+86 0512 86669996 http://www.panchip.com
版权©2012 磐启微电子
存器的bit6:0
当DATAOUT_SEL 为
0 时,
bit7:0 的输出为接收机实时给出
的4 位RSSI数据+数据包同步时
的接收机4 位RSSI 数据
与DATAOUT_SEL 位配合使用
0A
RX_ADDR_P0 39:0
0xE7E7E
7E7E7
R/W data pipe 0 的接收地址,最长5
字节。(由低字开始写。地址长
度由SETUP_AW 定义)
0B
RX_ADDR_P1 39:0
0xC2C2C
2C2C2
R/W data pipe 1 的接收地址,最长5
字节。(由低字开始写。地址长
度由SETUP_AW 定义)
0C
RX_ADDR_P2 7:0
0xC3
R/W data pipe 2 的接收地址,仅最
低位,
高位等于RX_ADDR_P1[39:8]
0D
RX_ADDR_P3 7:0
0xC4
R/W data pipe 3 的接收地址,仅最
低位,
高位等于RX_ADDR_P1[39:8]
0E
RX_ADDR_P4 7:0
0xC5
R/W data pipe 4 的接收地址,仅最
低位,
高位等于RX_ADDR_P1[39:8]
0F 0F
RX_ADDR_P5 7:0
0xC6
R/W data pipe 5 的接收地址,仅最
低位,
高位等于RX_ADDR_P1[39:8]
10 10
TX_ADDR
39:0
0xE7E7E
7E7E7
R/W 发送端地址。(由低字开始写)
只能在配置为PTX模式的芯片中
使用,需要设置RX_ADDR_P0
等于该地址以便在增强型通信模
式下的接收自动应答。
11 11
RX_PW_P0
data pipe 0 中的RX payload
的数据长度
Reserved Reserved
7 7
0 0
R/W Only 0 allowed
RX_PW_P0
6:0
0000000
R/W data pipe 0 中的RX payload
的数据长度(1 到64 字节)
0: 该Pipe 未用
TEL 上海:+86 021 61639330 苏州:+86 0512 86669996 http://www.panchip.com
版权©2012 磐启微电子
1 = 1 byte
… ...
64 = 64bytes
12 12
RX_PW_P1
data pipe 1 中的RX payload
的数据长度
Reserved Reserved
7 7
0 0
R/W Only 0 allowed
RX_PW_P1
6:0
0000000
R/W data pipe 1 中的RX payload
的数据长度(1 到64 字节)
0: 该Pipe 未用
1 = 1 byte
… ...
64 = 64 bytes
13 13
RX_PW_P2
data pipe 2 中的RX payload
的数据长度
Reserved Reserved
7 7
0 0
R/W Only 0 allowed
RX_PW_P2
6:0
0000000
R/W data pipe 2 中的RX payload
的数据长度(1 到64 字节)
0: 该Pipe 未用
1 = 1 byte
… ...
64 = 64 bytes
14 14
RX_PW_P3
data pipe 3 中的RX payload
的数据长度
Reserved Reserved
7 7
0 0
R/W Only 0 allowed
RX_PW_P3
6:0
0000000
R/W data pipe 3 中的RX payload
的数据长度(1 到64 字节)
0: 该Pipe 未用
1 = 1 byte
… ...
64 = 64 bytes
15 15
RX_PW_P4
data pipe 4 中的RX payload
的数据长度
Reserved Reserved
7 7
0 0
R/W Only 0 allowed
RX_PW_P4
6:0
0000000
R/W data pipe 4 中的RX payload
的数据长度(1 到64 字节)
TEL 上海:+86 021 61639330 苏州:+86 0512 86669996 http://www.panchip.com
版权©2012 磐启微电子
0: 该Pipe 未用
1 = 1 byte
… ...
64 = 64 bytes
16 16
RX_PW_P5
data pipe 5 中的RX payload
的数据长度
Reserved Reserved
7 7
0 0
R/W Only 0 allowed
RX_PW_P5
6:0
0000000
R/W data pipe 5 中的RX payload
的数据长度(1 到64 字节)
0: 该Pipe 未用
1 = 1 byte
… ...
64 = 64 bytes
17 17
FIFO_STATU
S S
FIFO 状态寄存器
Analog_data
7 7
0 0
R/W Bit9
TX_REUSE
6 6
0 0
R R
当为高时重传上一次发送中最后
一帧传送的数据,当CE引脚为高
时进行重传。TX_REUSE是由SPI
命令REUSE_TX_PL配置的,并且
由SPI命令W_TX_PAYLOAD或
FLUSH TX进行复位操作。
在增强型模式MAX_RT时,该位
为1,且REUSE_TX_PL失效。
TX_FULL
5 5
0 0
R R
TX FIFO 满标志位
1: TX FIFO 满
0: TX FIFO 可用
TX_EMPTY
4 4
1 1
R R
TX FIFO 空标志位
1: TX FIFO 空
0: TX FIFO 有数据
Analog_data
3:2
00 00
R/W Bit8:7
RX_FULL
1 1
0 0
R R
RX FIFO 满标志位
1: RX FIFO 满
0: RX FIFO 可用
RX_EMPTY
0 0
1 1
R R
RX FIFO 空标志位
1: RX FIFO 空.
TEL 上海:+86 021 61639330 苏州:+86 0512 86669996 http://www.panchip.com
版权©2012 磐启微电子
0: RX FIFO 有数据
N/A N / A
ACK_PLD
255:
0 0
X X
W W
通过SPI 写入,ACK 相应数据的
pipe 号由SPI 命令写入。只在
RX 模式下有效
N/A N / A
TX_PLD
255:
0 0
X X
W W
通过SPI 写入TX 数据,数据被
存放在2 级32 字节或1 级64
字节FIFO 中
只在TX 模式使用
N/A N / A
RX_PLD
255:
0 0
X X
R R
通过SPI 命令读出RX 数据,数
据被存放在2 级32 字节或1 级
64 字节FIFO 中,所有RX PIPE
共享同一个FIFO
19 19
DEMOD_CAL 39:0
03 A7 00
DF 0B
R/W 解调器参数(调试用寄存器)
1C
DYNPD
动态PAYLOAD 长度使能
Reserved Reserved
7:6
0 0
R/W Only 00 allowed
DPL_P5
5 5
0 0
R/W 使能PIPE 5 动态PAYLOAD 长
度 Degree
(需要EN_DPL 和ENAA_P5)
DPL_P4
4 4
0 0
R/W 使能PIPE 4 动态PAYLOAD 长
度 Degree
(需要EN_DPL 和ENAA_P4)
DPL_P3
3 3
0 0
R/W 使能PIPE 3 动态PAYLOAD 长
度 Degree
(需要EN_DPL 和ENAA_P3)
DPL_P2
2 2
0 0
R/W 使能PIPE 2 动态PAYLOAD 长
度 Degree
(需要EN_DPL 和ENAA_P2)
DPL_P1
1 1
0 0
R/W 使能PIPE 1 动态PAYLOAD 长
度 Degree
(需要EN_DPL 和ENAA_P1)
DPL_P0
0 0
0 0
R/W 使能PIPE 0 动态PAYLOAD 长
度 Degree
(需要EN_DPL 和ENAA_P0)
1D
FEATURE
特征寄存器
TEL 上海:+86 021 61639330 苏州:+86 0512 86669996 http://www.panchip.com
版权©2012 磐启微电子
Reserved Reserved
7:5
0 0
R/W Only 000 allowed
DATA_LEN_S
EL
4:3
00 00
数据长度选择
11: 64byte(512bit)模式
00: 32byte(256bit)模式
EN_DPL
2 2
0 0
R/W 使能动态PAYLOAD 长度
EN_ACK_PAY
1 1
0 0
R/W 使能带payload 的ACK
EN_DYN_AC
K K
0 0
0 0
R/W 使能
W_TX_PAYLOAD_NOACK命令
1E
RF_CAL
55:0
0x95 0x2B
0x83 0x61
0xB0 0x9A
0xCA
R/W 射频参数(调试用寄存器)
1F 1F
BB_CAL
39:0
0x20 0x9C
0x67 0x84
0x7F
R/W 基带参数(调试用寄存器)
7.7 数据包格式描述
7.7.1 增强型通信模式的数据包形式
增强型通信模式的数据包格式如表9 所示。
表9 增强型通信模式下的数据包形式
前导码
(3字节)
地址 Address
(35字节)
标识
(10比特)
数据 Data
(064字节)
CRC校验
(0/2字节)
表9 中地址位、标识位、和数据位可以选择扰码方式,或者不加扰码方式。标识位包
括10 比特,组成格式如表10 所示。
表10 增强型通信模式的标识位格式
数据长度标识
(7比特)
PID标识
(2比特)
NO_ACK标识
(1比特)
TEL 上海:+86 021 61639330 苏州:+86 0512 86669996 http://www.panchip.com
版权©2012 磐启微电子
7.7.2 通用型通信模式的数据包形式
通用型通信模式的数据包格式如表11所示。
表11 通用型通信模式数据包形式
前导码
(3字节)
地址 Address
(35字节)
数据 Data
(164字节)
CRC校验
(0/2字节)
TEL 上海:+86 021 61639330 苏州:+86 0512 86669996 http://www.panchip.com
版权©2012 磐启微电子
8. 典型应用电路
图10 XN297应用电路
TEL 上海:+86 021 61639330 苏州:+86 0512 86669996 http://www.panchip.com
版权©2012 磐启微电子
9. PCB 布线示例
图10 是XN297 应用原理图,图11、图12 和图13 是PCB 布线示意图。使用了1.6mm
厚度的FR-4 双面板,并且在PCB 板的顶层和底层各有一个铺铜面。顶层和底层的铺铜面
通过大量的过孔连接。PCB 板自带天线。
图11 顶层丝印
图12 顶层布线
TEL 上海:+86 021 61639330 苏州:+86 0512 86669996 http://www.panchip.com
版权©2012 磐启微电子
图13 底层布线
TEL 上海:+86 021 61639330 苏州:+86 0512 86669996 http://www.panchip.com
版权©2012 磐启微电子
10. 联系方式
苏州磐启微电子有限公司
地址:苏州工业园区星湖街328 号创意产业园2-B401 室
电话:+86-0512-86669996
传真:+86-0512-86669997
网址:http://www.panchip.com
上海研发中心
地址:上海市张江高科技园区盛夏路560 号904 室
电话:+86-021-61639330
传真:+86-021-61639331







Original Chinese text:
6.1.1 状态图 ..................................................................................................................... 7
Contribute a better translation