This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Test Code for CC1111 Wireless

Hi,

i want to write a code for my CC1111 which i can use the wireless like in SmartRF Studio 7. I use the example code for the radio but i want to send a own message not only a unmodulated signal. I configurate my code like SmartRF studio, and now i have my carrier bu 435MHz. But i can not send a own message or data. 

At SmartRF Studio 7 there i can send my own massage/data and i see by 435MHz my message sending. How can i write the same code?

This is my code:

SLEEP &= ~SLEEP_OSC_PD;                                // Clock config
while( !(SLEEP & SLEEP_XOSC_S) );
CLKCON = (CLKCON & ~(CLKCON_CLKSPD | CLKCON_OSC)) | CLKSPD_DIV_1;
while (CLKCON & CLKCON_OSC);
SLEEP |= SLEEP_OSC_PD;

/* RF settings SoC: CC1111 */                                 // config for 435MHz and own data sending ( from SmarfRF                                                                                                        Studio 7)

PKTCTRL0 = 0x05; // packet automation control
FSCTRL1 = 0x06; // frequency synthesizer control
FREQ2 = 0x12; // frequency control word, high byte
FREQ1 = 0x20; // frequency control word, middle byte
FREQ0 = 0x00; // frequency control word, low byte
MDMCFG4 = 0xE5; // modem configuration
MDMCFG3 = 0xA3; // modem configuration
MDMCFG2 = 0x13; // modem configuration
MDMCFG1 = 0x23; // modem configuration
MDMCFG0 = 0x11; // modem configuration
DEVIATN = 0x16; // modem deviation setting
MCSM0 = 0x18; // main radio control state machine configuration
FOCCFG = 0x17; // frequency offset compensation configuration
FSCAL3 = 0xE9; // frequency synthesizer calibration
FSCAL2 = 0x2A; // frequency synthesizer calibration
FSCAL1 = 0x00; // frequency synthesizer calibration
FSCAL0 = 0x1F; // frequency synthesizer calibration
TEST1 = 0x31; // various test settings
TEST0 = 0x09; // various test settings
PA_TABLE0 = 0x60; // pa power setting 0
IOCFG0 = 0x06; // radio test signal configuration (p1_5)
LQI = 0xD8; // demodulator estimate for link quality
PKTSTATUS = 0x80; // packet status

/* Put radio in TX. */
//RFST = RFST_STX;
RFST = 0x03;

/* Wait for radio to enter TX. */
while ((MARCSTATE & MARCSTATE_MARC_STATE) != MARC_STATE_TX); // TX olmasini bekliyor

char S = 1;


/* Radio is now in TX. Infinite loop. */


while (1)
{

RFTXRXIF = 0;


RFD = S;

EA = 1;
RFTXRXIE = 1;

}

}