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.

CC1101: Send and receive Data with preamble / sync word in PAYLOAD

Part Number: CC1101
Other Parts Discussed in Thread: TEST2

Hello again,

After a few posts, discussion and a lot of research this is my situation:

* I have 2 CC1101 and an existing off the shelf RF system

* I need to emulate sender and receiver of that system

* They should send and look for the same signal that the original system uses.

* The system does use a preamble and sync word before the data itself starts.

* Async mode is not an option with my code and MCU setup

* I have working code for the TX part, analysed by the original receiver signaling a reception and by comparing a recording of the signal to a recording of the original signal in Audacity.

* Preamble and sync word in the TX setup are in the payload, and I don’t use the built-in ones because the preamble wouldn’t align.

If I configure one CC1101 the exact same way as my transmitter, but put it into RX mode it won’t recognize / capture the data.

It makes sense that it needs to know what to look for, so what would be the recommended setup / register settings that I would need to change?

I’ll append my register settings and a screenshot of the data packet.

logical signal.

110110110110110110110110110110110110110110110110 100100100100 110100110110100110110110100100110110100100

in physical Bits (baudrate to send the above signal at a matching rate with the original sender: 2622 kBaud - see MDMCFG4 and MDMCFG3)

IOCFG2, 0x69
IOCFG1, 0x6E
IOCFG0, 0x46
FIFOTHR, 0x47
PKTLEN, 0x23
PKTCTRL1, 0x04
PKTCTRL0, 0x04

SYNC1, 0x55
SYNC0, 0x55
CHANNR, 0x00

FSCTRL1, 0x06
FSCTRL0, 0x00

FREQ2, 0x10
FREQ1, 0xB0
FREQ0, 0x71

MDMCFG4, 0xE6
MDMCFG3, 0xA7
MDMCFG2, 0x32 EDIT: 0x34
MDMCFG1, 0x22
MDMCFG0, 0xF8

DEVIATN, 0x15
MCSM2, 0x07
MCSM1, 0x20
MCSM0, 0x18
FOCCFG, 0x14
BSCFG, 0x6C
AGCCTRL2, 0x03
AGCCTRL1, 0x00
AGCCTRL0, 0x92
WOREVT1, 0x87
WOREVT0, 0x6B
WORCTRL, 0xFB
FREND1, 0x56
FREND0, 0x11
FSCAL3, 0xE9
FSCAL2, 0x2A
FSCAL1, 0x00
FSCAL0, 0x1F
RCCTRL1, 0x41
RCCTRL0, 0x00
FSTEST, 0x59
PTEST, 0x7F
AGCTEST, 0x3F
TEST2, 0x81
TEST1, 0x35
TEST0, 0x0B
0x3E, 0xC0

  • You write that your 'preamble' is '...111111...' but the plot shows that the the signals is just a logic '1' ~75 % of the time, not 100% which a '...11111...' should be.

    Also, CC1101 required a '...101010...' pattern as preamble. The chip requires this for bit sync.
  • Okay, sorry, in my transmitter implementation what I use is:
    110 for a logic 1 and 100 for a logic 0.
    So my signal would be:

    110 110 110 110 ..... 100 100 100 100 110 100 110 110 100 110 110 110 100 100 110 110 100 100.

    Can't that be recognised by the CC1101 in any way?
  • Why have you set the sync word to 0x55 if you are not actually sending this?
  • Just a place holder
  • You have set the receiver to look for a 2 byte sync word, in this case 0x5555. If you are not sending this the receiver will not find sync.
  • I'm sorry, I forgot to mention that after initializing I set the sync mode with a designated method in my code and the actual status of MDMCFG2 ends up being 0x34 before any transmission or reception starts.
  • In this mode the FIFO should fill up continuously if the input signal is above the threshold you have set. Have you checked that you read out the data from the FIFO fast enough since you will get a FIFO overflow if not? Have you checked MARC state?

    --

    EDIT: 

    Did a brief test and did not get data into the buffer.

    One cause could be that the chip does not obtain bit sync.

    If you can't use a sync word the best is to use async mode. I did not understand your other post why you canæt use this this since you have a low datarate. 

     

  • 110 for a logic 1 and 100 for a logic 0. Divide up the symbol into 3 equal time stamps and set the data rate as 1/time stamp.

    The sync word should be 16 bit long: Use the last "11 0000" bits in your preamble drawing as sync word: Converting: 110 110 100 100 100 100. The 16 LSB's are 0x65 24 and this will be the sync word on the RX side.

    Use 16/16 sync word detection (or 15/16) + carrier sense.
  • Thanks for your reply! It makes a lot of sense, but will it detect a preamble since it will not be 10101010 but 110110110... ?
  • Re: other post - you're right I totally mixed up carrier frequency and signal frequency / baudrate.
    My MDMCFG4 and MDMCFG3 settings are 0xE6 and 0xA7, so it should be 2622 kBaud right?
    Would this mean that I'll need to read 7866 times per second? My MCU is certainly capable of doing that.
    If I choose to use that mode, how will I know "when" to start reading? I mean I would need to do something like bit sync manually right?
  • The preamble is used for AGC settling, bit sync and setting up the bit decision slicing level. More transitions are better (hence 0x55 is the recommended preamble), but using 110110110110.... is ok.
  • The main reason I didn't suggest the same solution as Sverre is the resulting number of '1' -> '0' transitions with your settings since we normally recommend 4 byte of preamble.

    For your other question, yes, you would have to do a sync word search in the MCU.
  • Ohh I see I thought you can't change the preamble but only the sync word! So which registers are for preamble and which for sync word?
  • I see. So this would be my actual complete signal:
    110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 100 100 100 100 110 100 110 100 100 110 110 110 100 100 110 100 100 100

    110 110 110 110 110 1 = 0xDB6D = preamble,
    10 110 110 110 110 11 = 0xB6DB = sync word,
    rest = payload ??

  • As long as you don't use PQT having a non '1010' pattern works as long as you have enough transactions.

    Since you are now in RX the only thing you have to set is the sync word. 0 110 100 100 100 100 is the last 16 bites in the preamble + sync sequence and the bits after this is the payload without length word. The sequence you wrote in the last post is not the same as you wrote in the first post.
  • Okay, perfect!
    0 110 100 100 100 100 = 0x6924 ==> SYNC1 = 0x69, SYNC0 = 0x24?
    And MDMCFG2.SYNC_MODE = 1 (or 2)?
    If I'd like to transmit the above signal with sync word / preamble features, how would I set the preamble pattern?

  • Yes, 0x6924 looks correct. In tx you have to place everything as payload since the preamble pattern is not supported in the preamble registers.
  • Okay, that's perfectly fine and already working as mentioned :-)
    I don't have to change anything else (except SYNC1, SYNC0, MDMCFG2) right? For example the baud rate etc.?
    You mention "preamble registers". Which would these be?
    Also did I understand it correctly that the chip will be able to sync itself up with a non-10101010.. preamble automatically without me telling it anything about it?
  • * I was able to receive a transmission!
    * The only issue: It only worked after sending the signal for multiple seconds.
    * For whatever reason, at least when sending, I need to invert all bits, as well as when setting the sync word.
    * The RSSI is 244 and the received code contains mostly 0.
    → To me the RSSI looks very high and I probably need to invert the output back so it's essentially mostly "highs" (??). As the CC1101 takes a bit of time to pick up the signal and the strength is so high, maybe I need to turn down some kind of gain setting?

     

  • Now I tried reading the RSSI in an endless loop and I found out that it gives me a value of around 215 when I don't do anything and it goes up a little bit to around 250 when I send.
    The big difference is when putting the transmitter next to the CC1101. In that case, the reading drops down to around 35-60.
    I'm just not sure what to do with this information and how to carry on but I think this is an important piece of information!
  • Oops I didn’t want to close it yet! But maybe I’ll open a new thread that links to this one, for my current / new issue with the signal not being received consistently nor correctly and the RSSI.
  • For RSSI calculation, see www.ti.com/.../swra114d.pdf

    For close in reception, see www.ti.com/.../swra147b.pdf
  • OOK_E2E_RX.xml
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE configuration SYSTEM "C:/Program Files (x86)/Texas Instruments/SmartRF Tools/SmartRF Studio 7/config/xml/configdata.dtd"[]>
    <dcpanelconfiguration>
        <Devicename>CC1101</Devicename>
        <Description>Saved configuration data</Description>
        <registersettings>
            <Register>
                <Name>AGCCTRL1</Name>
                <Value>0x00</Value>
            </Register>
            <Register>
                <Name>AGCCTRL2</Name>
                <Value>0x04</Value>
            </Register>
            <Register>
                <Name>DEVIATN</Name>
                <Value>0x00</Value>
            </Register>
            <Register>
                <Name>FIFOTHR</Name>
                <Value>0x47</Value>
            </Register>
            <Register>
                <Name>FOCCFG</Name>
                <Value>0x16</Value>
            </Register>
            <Register>
                <Name>FREND0</Name>
                <Value>0x11</Value>
            </Register>
            <Register>
                <Name>FREQ0</Name>
                <Value>0x71</Value>
            </Register>
            <Register>
                <Name>FREQ1</Name>
                <Value>0xb0</Value>
            </Register>
            <Register>
                <Name>FREQ2</Name>
                <Value>0x10</Value>
            </Register>
            <Register>
                <Name>FSCAL0</Name>
                <Value>0x1f</Value>
            </Register>
            <Register>
                <Name>FSCAL1</Name>
                <Value>0x00</Value>
            </Register>
            <Register>
                <Name>FSCAL2</Name>
                <Value>0x2a</Value>
            </Register>
            <Register>
                <Name>FSCAL3</Name>
                <Value>0xe9</Value>
            </Register>
            <Register>
                <Name>FSCTRL1</Name>
                <Value>0x06</Value>
            </Register>
            <Register>
                <Name>IOCFG0</Name>
                <Value>0x06</Value>
            </Register>
            <Register>
                <Name>LQI</Name>
                <Value>0x7f</Value>
            </Register>
            <Register>
                <Name>MARCSTATE</Name>
                <Value>0x01</Value>
            </Register>
            <Register>
                <Name>MCSM0</Name>
                <Value>0x18</Value>
            </Register>
            <Register>
                <Name>MDMCFG2</Name>
                <Value>0x32</Value>
            </Register>
            <Register>
                <Name>MDMCFG3</Name>
                <Value>0xa7</Value>
            </Register>
            <Register>
                <Name>MDMCFG4</Name>
                <Value>0xe6</Value>
            </Register>
            <Register>
                <Name>PA_TABLE1</Name>
                <Value>0xc0</Value>
            </Register>
            <Register>
                <Name>PKTCTRL0</Name>
                <Value>0x04</Value>
            </Register>
            <Register>
                <Name>PKTLEN</Name>
                <Value>0x0a</Value>
            </Register>
            <Register>
                <Name>RSSI</Name>
                <Value>0x80</Value>
            </Register>
            <Register>
                <Name>SYNC0</Name>
                <Value>0x24</Value>
            </Register>
            <Register>
                <Name>SYNC1</Name>
                <Value>0x69</Value>
            </Register>
            <Register>
                <Name>TEST0</Name>
                <Value>0x09</Value>
            </Register>
            <Register>
                <Name>TEST1</Name>
                <Value>0x35</Value>
            </Register>
            <Register>
                <Name>TEST2</Name>
                <Value>0x81</Value>
            </Register>
            <Register>
                <Name>VCO_VC_DAC</Name>
                <Value>0x94</Value>
            </Register>
            <Register>
                <Name>WORCTRL</Name>
                <Value>0xfb</Value>
            </Register>
        </registersettings>
        <dcpanel>
            <Property role="44" name="m_chkRegView">2</Property>
            <Property role="44" name="m_chkCmdView">0</Property>
            <Property role="44" name="m_chkRfParameters">2</Property>
            <Property role="46" name="m_cmbUserMode">1</Property>
            <Property role="33" name="m_easyModeSettings">-1</Property>
            <Property role="33" name="m_typicalSettings">-1</Property>
            <Property role="37" name="m_testFuncPanel">3</Property>
        </dcpanel>
        <rfparameters>
            <Property role="46" name="m_cmbFrontends">0</Property>
            <Property role="44" name="m_chkHGMorBYP">2</Property>
            <Property role="46" name="m_cmbEmRevs">-1</Property>
            <Property role="46" name="Xtal Frequency">26.000000</Property>
        </rfparameters>
        <conttx>
            <Property role="45" name="m_rbtModulated">1</Property>
            <Property role="45" name="m_rbtUnmodulated">0</Property>
            <Property role="46" name="m_cmbDataFormat">-1</Property>
            <Property role="44" name="m_chkFreqSweep">0</Property>
            <Property role="44" name="m_chkChanSweep">0</Property>
        </conttx>
        <contrx>
            <Property role="46" name="m_cmbDataFormat">-1</Property>
            <Property role="44" name="m_chkAutoScroll">2</Property>
        </contrx>
        <packettx>
            <Property role="42" name="m_edtPayloadSize">10</Property>
            <Property role="42" name="m_edtPacketCount">100</Property>
            <Property role="42" name="m_edtPacketCountEsy">100</Property>
            <Property role="42" name="m_edtRandomPacketData">61 cd d1 1e 9d 9c 16 72 </Property>
            <Property role="42" name="m_edtPacketData"></Property>
            <Property role="42" name="m_edtAccessAddress"></Property>
            <Property role="42" name="m_edtDeviceAddress"></Property>
            <Property role="44" name="m_chkAddSeqNbr">2</Property>
            <Property role="44" name="m_chkInfinite">0</Property>
            <Property role="44" name="m_chkInfiniteEsy">0</Property>
            <Property role="45" name="m_rbtRandom">1</Property>
            <Property role="45" name="m_rbtText">0</Property>
            <Property role="45" name="m_rbtHex">0</Property>
            <Property role="44" name="m_chkAdvanced">0</Property>
        </packettx>
        <packetrx>
            <Property role="42" name="m_edtPacketCount">100</Property>
            <Property role="42" name="m_edtPacketCountEsy">100</Property>
            <Property role="42" name="m_edtAccessAddress"></Property>
            <Property role="44" name="m_chkInfinite">0</Property>
            <Property role="44" name="m_chkInfiniteEsy">0</Property>
            <Property role="46" name="m_cmbViewFormat">0</Property>
            <Property role="44" name="m_chkSeqNbrIncluded">0</Property>
            <Property role="42" name="m_edtDumpFile"></Property>
            <Property role="44" name="m_chkAdvanced">2</Property>
            <Property role="44" name="m_chk802154gMode">0</Property>
            <Property role="46" name="m_cmbSyncWord">2</Property>
            <Property role="46" name="m_cmbAddressConfig">0</Property>
            <Property role="44" name="m_chkAddress">0</Property>
            <Property role="44" name="m_chkFifoAutoFlush">0</Property>
            <Property role="42" name="m_edtAddress"></Property>
            <Property role="46" name="m_cmbLengthConfig_adv">0</Property>
            <Property role="42" name="m_edtLengthConfig_adv">10</Property>
        </packetrx>
        <commandpanel>
            <Property role="44" name="m_chkInsertLength">0</Property>
            <Property role="42" name="m_edtTxFifo"></Property>
            <Property role="42" name="m_edtRxFifo"></Property>
            <Property role="46" name="m_cmbInstrInput">-1</Property>
        </commandpanel>
    </dcpanelconfiguration>
    

    OOK_E2E_TX.xml
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE configuration SYSTEM "C:/Program Files (x86)/Texas Instruments/SmartRF Tools/SmartRF Studio 7/config/xml/configdata.dtd"[]>
    <dcpanelconfiguration>
        <Devicename>CC1101</Devicename>
        <Description>Saved configuration data</Description>
        <registersettings>
            <Register>
                <Name>AGCCTRL1</Name>
                <Value>0x00</Value>
            </Register>
            <Register>
                <Name>AGCCTRL2</Name>
                <Value>0x04</Value>
            </Register>
            <Register>
                <Name>DEVIATN</Name>
                <Value>0x00</Value>
            </Register>
            <Register>
                <Name>FIFOTHR</Name>
                <Value>0x47</Value>
            </Register>
            <Register>
                <Name>FOCCFG</Name>
                <Value>0x16</Value>
            </Register>
            <Register>
                <Name>FREND0</Name>
                <Value>0x11</Value>
            </Register>
            <Register>
                <Name>FREQ0</Name>
                <Value>0x71</Value>
            </Register>
            <Register>
                <Name>FREQ1</Name>
                <Value>0xb0</Value>
            </Register>
            <Register>
                <Name>FREQ2</Name>
                <Value>0x10</Value>
            </Register>
            <Register>
                <Name>FSCAL0</Name>
                <Value>0x1f</Value>
            </Register>
            <Register>
                <Name>FSCAL1</Name>
                <Value>0x00</Value>
            </Register>
            <Register>
                <Name>FSCAL2</Name>
                <Value>0x2a</Value>
            </Register>
            <Register>
                <Name>FSCAL3</Name>
                <Value>0xe9</Value>
            </Register>
            <Register>
                <Name>FSCTRL1</Name>
                <Value>0x06</Value>
            </Register>
            <Register>
                <Name>IOCFG0</Name>
                <Value>0x06</Value>
            </Register>
            <Register>
                <Name>LQI</Name>
                <Value>0x7f</Value>
            </Register>
            <Register>
                <Name>MARCSTATE</Name>
                <Value>0x01</Value>
            </Register>
            <Register>
                <Name>MCSM0</Name>
                <Value>0x18</Value>
            </Register>
            <Register>
                <Name>MDMCFG2</Name>
                <Value>0x30</Value>
            </Register>
            <Register>
                <Name>MDMCFG3</Name>
                <Value>0xa7</Value>
            </Register>
            <Register>
                <Name>MDMCFG4</Name>
                <Value>0xe6</Value>
            </Register>
            <Register>
                <Name>PA_TABLE1</Name>
                <Value>0xc0</Value>
            </Register>
            <Register>
                <Name>PKTCTRL0</Name>
                <Value>0x04</Value>
            </Register>
            <Register>
                <Name>PKTLEN</Name>
                <Value>0x0b</Value>
            </Register>
            <Register>
                <Name>RSSI</Name>
                <Value>0x80</Value>
            </Register>
            <Register>
                <Name>TEST0</Name>
                <Value>0x09</Value>
            </Register>
            <Register>
                <Name>TEST1</Name>
                <Value>0x35</Value>
            </Register>
            <Register>
                <Name>TEST2</Name>
                <Value>0x81</Value>
            </Register>
            <Register>
                <Name>VCO_VC_DAC</Name>
                <Value>0x94</Value>
            </Register>
            <Register>
                <Name>WORCTRL</Name>
                <Value>0xfb</Value>
            </Register>
        </registersettings>
        <dcpanel>
            <Property name="m_chkRegView" role="44">2</Property>
            <Property name="m_chkCmdView" role="44">0</Property>
            <Property name="m_chkRfParameters" role="44">2</Property>
            <Property name="m_cmbUserMode" role="46">1</Property>
            <Property name="m_easyModeSettings" role="33">-1</Property>
            <Property name="m_typicalSettings" role="33">-1</Property>
            <Property name="m_testFuncPanel" role="37">2</Property>
        </dcpanel>
        <rfparameters>
            <Property name="Xtal Frequency" role="46">26.000000</Property>
        </rfparameters>
        <conttx>
            <Property name="m_rbtModulated" role="45">1</Property>
            <Property name="m_rbtUnmodulated" role="45">0</Property>
            <Property name="m_cmbDataFormat" role="46">-1</Property>
            <Property name="m_chkFreqSweep" role="44">0</Property>
            <Property name="m_chkChanSweep" role="44">0</Property>
        </conttx>
        <contrx>
            <Property name="m_cmbDataFormat" role="46">-1</Property>
            <Property name="m_chkAutoScroll" role="44">2</Property>
        </contrx>
        <packettx>
            <Property name="m_edtPayloadSize" role="42">11</Property>
            <Property name="m_edtPacketCount" role="42">100</Property>
            <Property name="m_edtPacketCountEsy" role="42">100</Property>
            <Property name="m_edtRandomPacketData" role="42">61 cd d1 1e 9d 9c 16 72 72 e6 1d f0 84 4f 4a 77 02 d7 e8 39 2c 53 cb c9 12 1e 33 74 9e 0c f4 d5 d4 9f d4 a4 59 7e 35 cf 32 22 f4 cc cf d3 90 2d 48 d3 8f 75 e6 d9 1d 2a e5 c0 f7 2b </Property>
            <Property name="m_edtPacketData" role="42">DB 69 B6 DB 6D B6 92 41 2 3 4 </Property>
            <Property name="m_edtAccessAddress" role="42"></Property>
            <Property name="m_edtDeviceAddress" role="42"></Property>
            <Property name="m_chkAddSeqNbr" role="44">0</Property>
            <Property name="m_chkInfinite" role="44">0</Property>
            <Property name="m_chkInfiniteEsy" role="44">0</Property>
            <Property name="m_rbtRandom" role="45">0</Property>
            <Property name="m_rbtText" role="45">0</Property>
            <Property name="m_rbtHex" role="45">1</Property>
            <Property name="m_chkAdvanced" role="44">2</Property>
            <Property name="m_cmbSyncWord" role="46">0</Property>
            <Property name="m_cmbPreambleCount" role="46">2</Property>
            <Property name="m_chkAddress" role="44">0</Property>
            <Property name="m_edtAddress" role="42"></Property>
            <Property name="m_cmbLengthConfig" role="46">0</Property>
            <Property name="m_edtLengthConfig" role="42">11</Property>
            <Property name="m_spnPktInterval" role="52">300</Property>
            <Property name="m_chkDefPktInterval" role="44">2</Property>
        </packettx>
        <packetrx>
            <Property name="m_edtPacketCount" role="42">100</Property>
            <Property name="m_edtPacketCountEsy" role="42">100</Property>
            <Property name="m_edtAccessAddress" role="42"></Property>
            <Property name="m_chkInfinite" role="44">0</Property>
            <Property name="m_chkInfiniteEsy" role="44">0</Property>
            <Property name="m_cmbViewFormat" role="46">0</Property>
            <Property name="m_chkSeqNbrIncluded" role="44">0</Property>
            <Property name="m_edtDumpFile" role="42"></Property>
            <Property name="m_chkAdvanced" role="44">2</Property>
            <Property name="m_chk802154gMode" role="44">0</Property>
            <Property name="m_cmbSyncWord" role="46">0</Property>
            <Property name="m_cmbAddressConfig" role="46">0</Property>
            <Property name="m_chkAddress" role="44">0</Property>
            <Property name="m_chkFifoAutoFlush" role="44">0</Property>
            <Property name="m_edtAddress" role="42"></Property>
            <Property name="m_cmbLengthConfig_adv" role="46">0</Property>
            <Property name="m_edtLengthConfig_adv" role="42">11</Property>
        </packetrx>
        <commandpanel>
            <Property name="m_chkInsertLength" role="44">0</Property>
            <Property name="m_edtTxFifo" role="42"></Property>
            <Property name="m_edtRxFifo" role="42"></Property>
            <Property name="m_cmbInstrInput" role="46">-1</Property>
        </commandpanel>
    </dcpanelconfiguration>
    

    Went over the preamble and sync once more. Think the below is correct, but suggest you double check

    What you transmit: 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 100 100 100 100 110 100 110 100 100 110 110 110 100 100 110 100 100 100 (=34 x 3 chips = 102 chips)

    Preamble: 1101 1011 0110 1101 1011 0110 1101 1011 0110 1101 1011 = 0xDB 69 B6 DB 6D B (=first 44 chips)

    Sync: 0110 1001 0010 0100 = 0x6924 (=16 chips before payload)

    Payload: 1101 0011 0100 1001 1011 0110 1001 0011 0100 1001 00xx (=42 chips + 2 dummy chips)

    Did a test using SmartRF Studio and this worked fine. XML files attached. Note that I did not set up the payload correctly, only the preamble and sync (payload = 0x01 02 03 04 in the XML file). Note that the CRC will be wrong as this is calculated over all that is in the TX FIFO. CRC thus needs to be done manually.

  • Thanks, I get a RSSI reading of -91 dBm all of the time! I guess that's pretty low, how can I increase the receiver gain?
  • Do you read the same RSSI regardless of if you have a sender on or not? If so you have done something wrong.
  • Yes, that's completely correct. I will try using your register values now!
    Unfortunately, I still can't decode the data. The dBm are around -92 when not sending and around -70 when I send data.
    Is this too low? Maybe I need to increase some kind of gain value?
  • Yes I have a test firmware where I just read RSSI all the time.
  • I'm pretty sure that it is too "sensitive". The signal is not even staying at a logic low all of the time when not sending, but random noise is picked up as a "1" from now and then. And as soon as I trigger my remote, the signal is all high completely.
  • Could you maybe try to receive this signal?

    1010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010 0110011001101010 10010101101010010110101010101010101001010110010110101010100101101001011001101001101010011001011010010101010101100101010101101001011001011010101010010101101001100110101001010110100

    http://pasted.co/f1c4e1d5

    It has a regular preamble, but I still can't receive it.

    I only do:

    1.) reset()

    2.) your register settings for RX

    3.) set carrier frequency to 434.4MHz (as that's what this transmitter sends at)

    4.) set sync mode to 2

    5.) set sync word to 0x666A (marked in bold)

    6.) set into RX state, wait until RXBYTES has something and print it out.

    The device never prints anything :(

  • I would look into this code: processors.wiki.ti.com/.../Cc1101_easy_link_trxEB.zip on how to implement this.
  • I'm essentially doing the exact same thing like in cc1101_easy_link_rx.c.
    Weird...
  • Nearly the same or the same as in the code example? The code examples shows how you can do your implementation, if you have a code that does not do the same as the example code you have to step through the code and see where you get different results.
  • Please do not double post. Makes it more difficult to keep track of the case history and also creates double work on our part.

    Refer her for measurement results with 0x666A as sync word (along with the "old preamble + sync word"). e2e.ti.com/.../754367

    Regards,
    Sverre
  • I can't use an interrupt in Python but I have a busy waiting loop.
    It would be great if you had a look at the code: gist.github.com/.../e00be8849ca5a576efdda22b9f16e2a3
  • Is PA TABLE set to something else than 0x00 somewhere?
  • yes in line 109: [0x00,0xC0,0x00,0x00,0x00,0x00,0x00,0x00]
  • As you can see from www.ti.com/.../swra151a.pdf 0x00 basically turns the PA off, hence the question. But it shoul not have any impact in RX.

    I see that you for some reason try to write to read only registers.

    Have you monitored GDO0 with a scope to verify that you never get a transition on this pin?

  • I see!

    Which ones? I just wrote all the registers / values that provided :)

    Unfortunately I don’t have a scope, but I can try to get my hands on one at my university.

    If you say the code is fine and “should” work, I guess that’s the only option left to try. ¯\_(ツ)_/¯

    By the way: how do you guys connect to the chip via RFstudio? I bought it on a board with a simple SPI interface so no USB or such :D

  • In addition I have already tried to read the RXBYTES registers in the place where now I check for GDO0. I thought maybe SPI is too slow so I now use GDO0.
    Shouldn’t the RX buffer keep its data until I flush it / new information arrives though?

  • To connect the chip to SMartRF Studio you need a CCDebugger (www.ti.com/.../CC-DEBUGGER )

    Why do you use python in the first place, what is your assignment?
  • Ah cool thanks!
    Because I like it! :D And I didn't find any working C++ code for OOK either, so I thought to just write my own little firmware. Is there any problem with Python?
  • If you have to continuously check if you have received a packet by reading a pin/ register the MCU is tied up for this task and it's limited what else you can do processing wise. Using interrupts the MCU can do other thing until sync is found or sleep. Also you can use our example code directly less work is required to get this up and running. And if python doesn't support interrupts you have to use something that does.
  • That's not an issue, as the whole thing should just listen for the transmission and save the code to memory for now. The MCU doesn't need to do anything else at the same time.
    It's true that Python doesn't support interrupts, but the loop should work, right? I mean how long is the "high" pulse on GDO0 when a sync word is received?
  • As stated in the datasheet the pulse is high as long as the time it takes to receive the payload.

    I'm closing this thread since you also have a seperate thread open on the topic. We have also given you enough help to enable you to get this up and running.
  • Sure thanks!