Part Number:CC1120
Hello
I want to send some random data from CC1120/CC1121 and look at with spectrum analyzer to verify me RF settings, but I am not able to send anything.
this is the code i use to send data. It works fine with CC1101, but not with CC1120:
void tx(int CS){
// - Pull chip select LOW
// - Transfer data to TX FIFO (0x3F | 0x40)
// - Strobe command STX (0x35)
// - Flush TX FIFO (0x3B)
// - Chip select HIGH
digitalWrite(CS, LOW);
while(digitalRead(MISO)>0) {}
SPI.transfer(CC1101_writeToFIFO);
for ( int i=0; i<30; i++){
SPI.transfer(i);
}
digitalWrite(CS, HIGH);
delay(50);
digitalWrite(CS, LOW);
while(digitalRead(MISO)>0) {}
SPI.transfer(CC1101_gotoTX);
SPI.transfer(CC1101_flushTX);
digitalWrite(CS, HIGH);
}
After transmit the MARC_STATUS1 register show tx finished succesfylly, but all I see on spectrum analyzer is a flat RF wave around 430MHz. Nothing around 868MHz, which is the set frequency.
The settings are from smartRF studio. They are first written and then read back, to confirm that they are stored:
BIN | HEKS | ||
IOCFG3 | 00000110 | 6 | |
IOCFG2 | 00000111 | 7 | |
IOCFG1 | 00110000 | 30 | |
IOCFG0 | 00111100 | 3C | |
SYNC3 | 01101110 | 6E | 110 |
SYNC2 | 00101100 | 2C | 44 |
SYNC1 | 01101110 | 6E | 110 |
SYNC0 | 00101100 | 2C | 44 |
SYNC_CFG1 | 00001011 | B | |
SYNC_CFG0 | 00010111 | 17 | 32 bit sync word |
DEVIATION_M | 10011010 | 9A | 25kHz deviation |
MODCFG_DEV_E | 00000101 | 5 | normal mode, 2FSK |
DCFILT_CFG | 00011100 | 1C | |
PREAMBLE_CFG1 | 00010101 | 15 | 3 bytes preamble, 0x55 |
PREAMBLE_CFG0 | 00101010 | 2A | |
FREQ_IF_CFG | 01000000 | 40 | |
IQIC | 01000110 | 46 | |
CHAN_BW | 00000001 | 1 | 200kHz BW |
MDMCFG1 | 01110110 | 76 | Manchester, invert data |
MDMCFG0 | 00001101 | D | |
SYMBOL_RATE2 | 01100011 | 63 | |
SYMBOL_RATE1 | 10101001 | A9 | 4800 synbol rate |
SYMBOL_RATE0 | 00101010 | 2A | |
AGC_REF | 00100000 | 20 | |
AGC_CS_THR | 00011001 | 19 | |
AGC_GAIN_ADJUST | 00000000 | 0 | |
AGC_CFG3 | 10010001 | 91 | |
AGC_CFG2 | 00100000 | 20 | |
AGC_CFG1 | 10101001 | A9 | |
AGC_CFG0 | 11001111 | CF | |
FIFO_CFG | 10000000 | 80 | |
DEV_ADDR | 00011111 | 1F | 31 |
SETTLING_CFG | 00001011 | B | |
FS_CFG | 00010010 | 12 | 868MHz |
WOR_CFG1 | 00001000 | 8 | |
WOR_CFG0 | 00100001 | 21 | |
WOR_EVENT0_MSB | 00000000 | 0 | |
WOR_EVENT0_LSB | 00000000 | 0 | |
PKT_CFG2 | 00000000 | 0 | always give CCA |
PKT_CFG1 | 00000000 | 0 | |
PKT_CFG0 | 00000000 | 0 | fixed packet length |
RFEND_CFG1 | 00001111 | F | |
RFEND_CFG0 | 00000000 | 0 | |
PA_CFG2 | 01111111 | 7F | |
PA_CFG1 | 01010110 | 56 | |
PA_CFG0 | 01111110 | 7E | |
PKT_LEN | 00011110 | 1E | 30 byte packet length |
IF_MIX_CFG | 00000100 | 4 | |
FREQOFF_CFG | 00000000 | 0 | |
TOC_CFG | 00001011 | B | |
MARC_SPACE | 00000000 | 0 | |
ECG_CFG | 00000000 | 0 | |
CFM_DATA_CFG | 00000000 | 0 | |
EXT_CTRL | 00000001 | 1 | |
RCCAL_FINE | 00000000 | 0 | |
RCCAL_COARSE | 00000000 | 0 | |
RCCAL_OFFSET | 00000000 | 0 | |
FREQOFF1 | 00000000 | 0 | |
FREQOFF0 | 00000000 | 0 | |
FREQ2 | 01101100 | 6C | |
FREQ1 | 10000000 | 80 | 868MHz |
FREQ0 | 00000000 | 0 |
Any idea what the reason could be? config, code or HW?
BR