Hi,
When I configured the registers of CC1120 and CC1101, the CC1120 still cannot communicate with the chronos watch which uses cc430f6137 mcu.
I configured the frequency, preamble, sync, Rx filter Bw, data rate, packet length, address, frequency deviation, the mode of modulation.
Here are my cofigurations:
/***************************************************************
* SmartRF Studio(tm) Export
*
* Radio register settings specifed with C-code
* compatible #define statements.
*
* RF device: CC1120
*
***************************************************************/
#ifndef SMARTRF_CC1120_H
#define SMARTRF_CC1120_H
#define SMARTRF_RADIO_CC1120
#define SMARTRF_SETTING_IOCFG3 0xB0
#define SMARTRF_SETTING_IOCFG2 0x06
#define SMARTRF_SETTING_IOCFG1 0xB0
#define SMARTRF_SETTING_IOCFG0 0x40
#define SMARTRF_SETTING_SYNC_CFG1 0x0B
#define SMARTRF_SETTING_DEVIATION_M 0x38
#define SMARTRF_SETTING_MODCFG_DEV_E 0x05
#define SMARTRF_SETTING_DCFILT_CFG 0x1C
#define SMARTRF_SETTING_PREAMBLE_CFG1 0x18
#define SMARTRF_SETTING_IQIC 0x46
#define SMARTRF_SETTING_CHAN_BW 0x02
#define SMARTRF_SETTING_MDMCFG0 0x05
#define SMARTRF_SETTING_SYMBOL_RATE2 0x93
#define SMARTRF_SETTING_SYMBOL_RATE1 0x73
#define SMARTRF_SETTING_SYMBOL_RATE0 0x02
#define SMARTRF_SETTING_AGC_REF 0x20
#define SMARTRF_SETTING_AGC_CS_THR 0x19
#define SMARTRF_SETTING_AGC_CFG1 0xA9
#define SMARTRF_SETTING_AGC_CFG0 0xCF
#define SMARTRF_SETTING_FIFO_CFG 0x00
#define SMARTRF_SETTING_SETTLING_CFG 0x03
#define SMARTRF_SETTING_FS_CFG 0x14
#define SMARTRF_SETTING_PKT_CFG0 0x20
#define SMARTRF_SETTING_PA_CFG2 0x3F
#define SMARTRF_SETTING_PA_CFG0 0x7B
#define SMARTRF_SETTING_PKT_LEN 0xFF
#define SMARTRF_SETTING_IF_MIX_CFG 0x00
#define SMARTRF_SETTING_FREQOFF_CFG 0x22
#define SMARTRF_SETTING_FREQ2 0x6C
#define SMARTRF_SETTING_FREQ1 0x80
#define SMARTRF_SETTING_FS_DIG1 0x00
#define SMARTRF_SETTING_FS_DIG0 0x5F
#define SMARTRF_SETTING_FS_CAL1 0x40
#define SMARTRF_SETTING_FS_CAL0 0x0E
#define SMARTRF_SETTING_FS_CHP 0x27
#define SMARTRF_SETTING_FS_DIVTWO 0x03
#define SMARTRF_SETTING_FS_DSM0 0x33
#define SMARTRF_SETTING_FS_DVC0 0x17
#define SMARTRF_SETTING_FS_PFD 0x50
#define SMARTRF_SETTING_FS_PRE 0x6E
#define SMARTRF_SETTING_FS_REG_DIV_CML 0x14
#define SMARTRF_SETTING_FS_SPARE 0xAC
#define SMARTRF_SETTING_FS_VCO4 0x18
#define SMARTRF_SETTING_FS_VCO1 0x9C
#define SMARTRF_SETTING_FS_VCO0 0xB4
#define SMARTRF_SETTING_XOSC5 0x0E
#define SMARTRF_SETTING_XOSC1 0x03
#define SMARTRF_SETTING_DCFILTOFFSET_I1 0x01
#define SMARTRF_SETTING_DCFILTOFFSET_I0 0xFB
#define SMARTRF_SETTING_DCFILTOFFSET_Q1 0x05
#define SMARTRF_SETTING_DCFILTOFFSET_Q0 0xD2
#define SMARTRF_SETTING_RSSI1 0xFD
#define SMARTRF_SETTING_RSSI0 0x43
#define SMARTRF_SETTING_PQT_SYNC_ERR 0x6F
#define SMARTRF_SETTING_FREQOFF_EST1 0xFF
#define SMARTRF_SETTING_FREQOFF_EST0 0x3D
#define SMARTRF_SETTING_AGC_GAIN3 0x20
#define SMARTRF_SETTING_AGC_GAIN2 0xAA
#define SMARTRF_SETTING_AGC_GAIN1 0x14
#define SMARTRF_SETTING_MAGN0 0x80
#define SMARTRF_SETTING_ANG1 0x02
#define SMARTRF_SETTING_ANG0 0xBE
#define SMARTRF_SETTING_CHFILT_I2 0x0F
#define SMARTRF_SETTING_CHFILT_I1 0xFF
#define SMARTRF_SETTING_CHFILT_I0 0xE3
#define SMARTRF_SETTING_CHFILT_Q2 0x07
#define SMARTRF_SETTING_CHFILT_Q1 0xFF
#define SMARTRF_SETTING_CHFILT_Q0 0xB3
#define SMARTRF_SETTING_PARTNUMBER 0x48
#define SMARTRF_SETTING_PARTVERSION 0x21
#define SMARTRF_SETTING_MODEM_STATUS1 0x11
#endif
And here is the configurations for cc1101:
// Address config = No address check
// CRC autoflush = false
// Base frequency = 433.999573
// Sync word qualifier mode = 30/32 sync word bits detected
// Manchester enable = false
// Packet length mode = Variable packet length mode. Packet length configured by the first byte after sync word
// Modulation format = 2-FSK
// RX filter BW = 101.562500
// Device address = 0
// Carrier frequency = 433.999573
// Whitening = false
// Packet length = 61
// Data rate = 37.9868
// Preamble count = 4
// PA ramping = false
// Data format = Normal mode
// TX power = 0
// CRC enable = true
// Channel spacing = 199.951172
// Channel number = 0
// Deviation = 19.042969
// Modulated = true
// Rf settings for CC1101
RF_SETTINGS code rfSettings = {
0x06, // IOCFG0 GDO0 Output Pin Configuration
0x47, // FIFOTHR RX FIFO and TX FIFO Thresholds
0x3D, // PKTLEN Packet Length
0x05, // PKTCTRL0 Packet Automation Control
0x06, // FSCTRL1 Frequency Synthesizer Control
0x10, // FREQ2 Frequency Control Word, High Byte
0xB1, // FREQ1 Frequency Control Word, Middle Byte
0x3A, // FREQ0 Frequency Control Word, Low Byte
0xCA, // MDMCFG4 Modem Configuration
0x7F, // MDMCFG3 Modem Configuration
0x03, // MDMCFG2 Modem Configuration
0x34, // DEVIATN Modem Deviation Setting
0x18, // MCSM0 Main Radio Control State Machine Configuration
0x16, // FOCCFG Frequency Offset Compensation Configuration
0xFB, // WORCTRL Wake On Radio Control
0xE9, // FSCAL3 Frequency Synthesizer Calibration
0x2A, // FSCAL2 Frequency Synthesizer Calibration
0x00, // FSCAL1 Frequency Synthesizer Calibration
0x1F, // FSCAL0 Frequency Synthesizer Calibration
0x81, // TEST2 Various Test Settings
0x35, // TEST1 Various Test Settings
0x09, // TEST0 Various Test Settings
};
Preamble is 4 bytes 0xAA,0xAA,0xAA,0xAA. SYNC is 4 bytes 0xD391D391.
Q1:I wonder if I had forgot anything to configure or is there anything which I configured wrong?
Q2: Does CRC need to be configured? Or it is automatically configured?
Q3: I have tried modifying the Tx Power to be the same, but it didn't work. So is thers any need to configure it the same with each other?
Please help.
Regards,
Can