#BATCHNAME RX 913.0 MHz Packet FIFO 40kbps
# Revision Date:  12/16/2009
# This script is appropriate for use with EZRadioPRO:
#  443x-T-B1-B-x (or DKDB1) Split TX/RX RF Test Card
#  443x-T-B1-D-x Direct Tie RF Test Card
#  Do NOT use with 443x-T-B1-A-x (or DKDB0) AntDiv RF Test Card
#  Do NOT use with 443x-T-B1-C-x (or DKDB2) Single Antenna RF Test Card
#    (GPIO pins are not available for control of AntDiv or RF Switch)

# Set SDN Pin 20 = LOW
L6
# Set VDD:  1.8V=V54, 2.4V=V7E, 3.0V=V98, 3.3V=VA1, 3.6V=VA9
VA1
# Apply Software Reset
S2 8780

# Adjust Crystal for zero freq error (User may need to modify this value)
S2 8971

### Set Desired Receive Frequency = 913.0 MHz ###
S2 F575
S2 F6A2
S2 F780

# Select TR Data Clock out via GPIO, FIFO Mode, GFSK.
S2 F163

### Set RX Packet Parameters ###
# Enable automatic RX Packet Handling, Disable CRC
S2 B080
# Set Preamble Length = 16 nibbles (64 bits)
S2 B410
# Set Preamble Detection Threshold = 5 nibbles (20 bits)
S2 B528
# Set Fixed Packet Length, No Header, SYNC word = 2 Bytes:  Sync Word 3 & 2
S2 B30A
# Set SYNC Word = 2DD4h (as an example)
S2 B62D
S2 B7D4
# Set Packet Length = 4 bytes (as an example)
S2 BE04

### Set RX Modem Parameters (from Excel Register Calculator) ###
# 40KBPS data rate, 20kHz dev, Mod Index=1, XtalTol=1/1, BW=83.2kHz, AFC Enabled
S2 9C02
S2 A064
S2 A101
S2 A247
S2 A3AE
S2 A402
S2 A591
S2 9D40
S2 9E0A
# 'S2 F218' for Si4432_V2, 'S2 AA1E' for Si4432_B1
S2 AA1E
S2 E960

### Configure GPIOs ###
# Set GPIO0 = PREAMBLE_VALID output
#   (GPIO0 is not available as an output on Load Board SMA connector.  This
#   signal must be measured at the GPIO0 test point on the RF Test Card.)
S2 8B19
# Set GPIO1 = RXDATA output (with increased GPIO drive)
#   (GPIO1 is conveniently hard-wired to SMA connector on Load Board)
S2 8C94
# Configure GPIO2 = SYNC_OK output
#   (GPIO2 is conveniently hard-wired to SMA connector on Load Board)
S2 8D1B

### Turn Receiver ON ###
S2 8704

# Note that running this script will result in receiving only ONE RX packet,
#   after which the RFIC automatically turns off.  Subsequent RX packets
#   may be received by sending only a 'S2 8704' command; there is no
#   need to re-send this entire script.
