I am having a problem with the CC1200. My application is a mobile unit transmitting
data to a base station. Since a high data rate and accuracy are important I would
like to transmit at 1.25 Mb/sec and have the base station ack/nak each packet. When
sending data one way (mobile to base station) the data packets have about a 1% error
rate (240-byte packets). Good but not good enough.
When I try to send back an ack/nak packet (base station to mobile) , the ack/nak
packet always has isolated but multiple bit errors (16-byte packets).
The sequence for the mobile unit is:
1) Reset the CC1200 and load the registers.
2) Manually calibrate.
3) Transmit 240 bytes. (Multiple fills to the Tx FIFO required.)
4) When Tx complete, load the registers with Rx values and go from Tx to Rx.
5) When Rx complete, read Rx FIFO, check for Rx FIFO errors.
6) Load the registers with Tx values and go to Tx. Back to step 3.
The base station sequence is:
1) Reset the CC1200 and load the registers.
2) Manually calibrate.
3) Go to Rx. (Multiple Rx FIFO reads required.)
4) When Rx complete, load registers with Tx values and go to Tx.
5) Load the Tx FIFO and transmit 16-byte ack/nak packet.
6) When Tx complete, load the registers with Rx values and go to step 3.
Although the sequence is written as a loop, I have been debugging the first pass.
That is, the mobile is set to breakpoint after the Rx FIFO is read.
The timing sequence appears perfect (using SPI bus scope) but the CRC is never good
and there are random but isolated bit errors. I have tried adding delays before
sending the ack/nak, going through idle rather than going directly from Rx to Tx and
recalibrating in idle, whitening on/off, but nothing makes an improvement
(recalibrating seemed to be worse).
I know that I am pushing the limit on data rate and Rx/Tx turnaround time but I am
staying within the CC1200 specifications. Any ideas?
All of the radio control registers where determined and tested by using SmartRF
Studio 7.
Mobile Registers:
// RX filter BW = 1666.7 kHz
// Address config = No address check.
// Fixed packet length = 240
// Symbol rate = 625 kHz
// Carrier frequency = 915 MHz
// Bit rate = 1250 kbps
// Packet bit length = 0
// Manchester enable = false
// Modulation format = 4-GFSK
// Packet length mode = Fixed
// Deviation = 400 kHz
static const cc1200::RegisterSetting_t CC1200SettingsTable[]=
{
{IOCFG2, 0x06},
{IOCFG0, 0x02}, // Tx FIFO interrupt
{SYNC_CFG1, 0x88}, // 3 sync bytes
{DEVIATION_M, 0x47},
{MODCFG_DEV_E, 0x2F},
{DCFILT_CFG, 0x1E},
{PREAMBLE_CFG1, 0x10}, // 2 byte preamble = 0xAA
{PREAMBLE_CFG0, 0x8A},
{IQIC, 0x00},
{CHAN_BW, 0x01},
{MDMCFG1, 0x42},
{MDMCFG0, 0x05},
{SYMBOL_RATE2, 0xD0},
{SYMBOL_RATE1, 0x00},
{SYMBOL_RATE0, 0x00},
{AGC_REF, 0x2F},
{AGC_CS_THR, 0x01},
{AGC_GAIN_ADJUST, 0xAE}, // -82 dBm adjustment
{AGC_CFG2, 0x60},
{AGC_CFG1, 0x12},
{AGC_CFG0, 0x84},
{FIFO_CFG, 0x49}, // 54 byte threshold in Tx FIFO
{SETTLING_CFG, 0x03}, // manual calibration, 75/30 usec settling
{FS_CFG, 0x12},
{PKT_CFG2, 0x00},
{PKT_CFG1, 0x43},
{PKT_CFG0, 0x00}, // 0x20 for variable packet length
{RFEND_CFG1, 0x3F}, // 0x0F to go to Idle after ack
{RFEND_CFG0, 0x30}, // 0x30 to go to Rx after packet
{PA_CFG1, 0x7F}, // (3F + 1)/2 - 18 dBm = 14 dBm
{PKT_LEN, 0xF0}, // 240 byte fixed packet
{FREQOFF_CFG, 0x23},
{MDMCFG2, 0x00},
{FREQ2, 0x5B},
{FREQ1, 0x80},
{IF_ADC1, 0xEE},
{IF_ADC0, 0x10},
{FS_DIG1, 0x04},
{FS_DIG0, 0xA3},
{FS_CAL1, 0x40},
{FS_CAL0, 0x0E},
{FS_DIVTWO, 0x03},
{FS_DSM0, 0x33},
{FS_DVC0, 0x17},
{FS_PFD, 0x00},
{FS_PRE, 0x6E},
{FS_REG_DIV_CML, 0x1C},
{FS_SPARE, 0xAC},
{FS_VCO0, 0xB5},
{IFAMP, 0x0D},
{XOSC5, 0x0E},
{XOSC1, 0x03},
{PARTNUMBER, 0x20},
{PARTVERSION, 0x11},
{MODEM_STATUS1, 0x10},
};
static const cc1200::RegisterSetting_t RxSettings[]=
{
{PKT_LEN, 0x10}, // 16 byte fixed packet length
{FS_DIG1, 0x07}, // determined by SmartRF Studio
{FS_DIG0, 0xA0}, // determined by SmartRF Studio
{PKT_CFG1, 0x03} // whitening off for ack/nak
};
static const cc1200::RegisterSetting_t TxSettings[]=
{
{PKT_LEN, 0xF0}, // 240 byte fixed packet length
{FS_DIG1, 0x04}, // determined by SmartRF Studio
{FS_DIG0, 0xA3}, // determined by SmartRF Studio
{PKT_CFG1, 0x43} // whitening on for data packet
};
Base Station Registers:
// RX filter BW = 1666.7 kHz
// Address config = No address check.
// Fixed packet length = 240
// Symbol rate = 625 kHz
// Carrier frequency = 915 MHz
// Bit rate = 1250 kbps
// Packet bit length = 0
// Manchester enable = false
// Modulation format = 4-GFSK
// Packet length mode = Fixed
// Deviation = 400 kHz
static const cc1200::RegisterSetting_t CC1200SettingsTable[]=
{
{IOCFG2, 0x06},
{IOCFG0, 0x00}, // interrupt on Rx FIFO > threshold
{SYNC_CFG1, 0x88}, // 3 sync bytes
{DEVIATION_M, 0x47},
{MODCFG_DEV_E, 0x2F},
{DCFILT_CFG, 0x1E},
{PREAMBLE_CFG1, 0x10}, // 2 byte preamble = 0xAA
{PREAMBLE_CFG0, 0x8A},
{IQIC, 0x00},
{CHAN_BW, 0x01},
{MDMCFG1, 0x42},
{MDMCFG0, 0x05},
{SYMBOL_RATE2, 0xD0},
{SYMBOL_RATE1, 0x00},
{SYMBOL_RATE0, 0x00},
{AGC_REF, 0x2F},
{AGC_CS_THR, 0x01},
{AGC_GAIN_ADJUST, 0xAE}, // -82 dBm adjustment
{AGC_CFG2, 0x60},
{AGC_CFG1, 0x12},
{AGC_CFG0, 0x84},
{FIFO_CFG, 0x49}, // 73+1 byte threshold in Rx FIFO
{SETTLING_CFG, 0x03}, // manual calibration, 75/30 usec settling
{FS_CFG, 0x12},
{PKT_CFG2, 0x00},
{PKT_CFG1, 0x43},
{PKT_CFG0, 0x00}, // 0x20 for variable length
{RFEND_CFG1, 0x3f}, // 0x3F for stay in Rx mode, no timeout
{RFEND_CFG0, 0x30}, // 0x30 for Rx after Tx
{PA_CFG1, 0x7F}, // (3F + 1)/2 - 18 dBm = 14 dBm
{PKT_LEN, 0xF0}, // 240 byte fixed packet length
{FREQOFF_CFG, 0x23},
{MDMCFG2, 0x00},
{FREQ2, 0x5B},
{FREQ1, 0x80},
{IF_ADC1, 0xEE},
{IF_ADC0, 0x10},
{FS_DIG1, 0x07},
{FS_DIG0, 0xA0},
{FS_CAL1, 0x40},
{FS_CAL0, 0x0E},
{FS_DIVTWO, 0x03},
{FS_DSM0, 0x33},
{FS_DVC0, 0x17},
{FS_PFD, 0x00},
{FS_PRE, 0x6E},
{FS_REG_DIV_CML, 0x1C},
{FS_SPARE, 0xAC},
{FS_VCO0, 0xB5},
{IFAMP, 0x0D},
{XOSC5, 0x0E},
{XOSC1, 0x03},
{PARTNUMBER, 0x20},
{PARTVERSION, 0x11},
{MODEM_STATUS1, 0x10},
};
// Register settings for Tx
static const cc1200::RegisterSetting_t TxSettings[]=
{
{PKT_LEN, 0x10}, // 16 byte fixed packet length
{FS_DIG1, 0x04}, // determined by SmartRF Studio
{FS_DIG0, 0xA3}, // determined by SmartRF Studio
{PKT_CFG1, 0x03} // whitening off for ack/nak
};
// Register settings for Rx
static const cc1200::RegisterSetting_t RxSettings[]=
{
{PKT_LEN, 0xF0}, // 240 byte fixed packet length
{FS_DIG1, 0x07}, // determined by SmartRF Studio
{FS_DIG0, 0xA0}, // determined by SmartRF Studio
{PKT_CFG1, 0x43} // whitening on for data packet
};