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: async vs sync mode - how decode data from raw

Part Number: CC1101
Other Parts Discussed in Thread: TEST2

Hello!,

after a long time trying i decidet to post here my issue :).

What i have:

Smartrf with CC1101 for testing purposes

Logic analyzer - cheap one

Teensy with two CC1101 on SPI

Right now i am having issues with CC1101 setup. I was able to manage right parameters for my case (i async i am receiving right data):

halRfWriteReg(IOCFG2,0x0E); //GDO2 Output Pin Configuration

halRfWriteReg(IOCFG0,0x0D); //GDO0 Output Pin Configuration

halRfWriteReg(FIFOTHR,0x47); //RX FIFO and TX FIFO Thresholds

halRfWriteReg(SYNC1,0xAA); //Sync Word, High Byte

halRfWriteReg(SYNC0,0xB2); //Sync Word, Low Byte

halRfWriteReg(PKTLEN,0x3D); //Packet Length

halRfWriteReg(PKTCTRL0,0x32); //Packet Automation Control

halRfWriteReg(FSCTRL1,0x06); //Frequency Synthesizer Control

halRfWriteReg(FREQ2,0x10); //Frequency Control Word, High Byte

halRfWriteReg(FREQ1,0xB5); //Frequency Control Word, Middle Byte

halRfWriteReg(FREQ0,0x90); //Frequency Control Word, Low Byte

halRfWriteReg(MDMCFG4,0x87); //Modem Configuration

halRfWriteReg(MDMCFG3,0x12); //Modem Configuration

halRfWriteReg(MDMCFG2,0x38); //Modem Configuration

halRfWriteReg(DEVIATN,0x15); //Modem Deviation Setting

halRfWriteReg(MCSM0,0x18); //Main Radio Control State Machine Configuration

halRfWriteReg(FOCCFG,0x16); //Frequency Offset Compensation Configuration

halRfWriteReg(WORCTRL,0xFB); //Wake On Radio Control

halRfWriteReg(FREND0,0x17); //Front End TX Configuration

halRfWriteReg(FSCAL3,0xE9); //Frequency Synthesizer Calibration

halRfWriteReg(FSCAL2,0x2A); //Frequency Synthesizer Calibration

halRfWriteReg(FSCAL1,0x00); //Frequency Synthesizer Calibration

halRfWriteReg(FSCAL0,0x1F); //Frequency Synthesizer Calibration

halRfWriteReg(TEST2,0x81); //Various Test Settings

halRfWriteReg(TEST1,0x35); //Various Test Settings

halRfWriteReg(TEST0,0x09); //Various Test Settings

halRfWriteReg(VERSION,0x14); //Chip ID

halRfWriteReg(RSSI,0x80); //Received Signal Strength Indication

halRfWriteReg(MARCSTATE,0x01); //Main Radio Control State Machine State

halRfWriteReg(VCO_VC_DAC,0x94);//Current Setting from PLL Calibration Module

I am trying to recieve signal from keeloq device. I was able to manage to get data in asynchronous mode:

So now some questions:

1. Do i need to use Asynchronous mode ?

I know that i was able to get raw data so i will be able to manage some Teensy handling and timming for demodulation.

2. Is there way how setup Synchronous mode ?

I counted bits several times .. i know that there is PKTLEN register which is in Packets (dont know what exactly mean by packet) than there is a packet count (usually key send data 3times same so one time is one packet ?).

Than there is a FIFOTHR .. this is for setting FIFO Rx data ? in this case is 0x47 ok ? (32 bytes ?).

3. Can you help me setup synchronous mode for RX ?

  • There is long preamble - synchronizing bits - from what i underestand more preamble bits better.
  • There is sync word - in my program for teensy i already was able to get right interrupts when data was catched in async mode.
  • I was not able to get data in sync mode.
  • I was not able to get data in sync mode in SmartRF studio.

4. How to calculate data rate ?

I measured signal from transmitter. I know how long is pulse 1 or 0. How do i determine from this time data rate ? I also read that its releated to bandwidth.

Thank you so much for help in advance and sorry for my english ! :)

  • For keeloq, check this post: e2e.ti.com/.../148027
  • Yes i already did. This was first post i checked.

    Still dont underestand why i need asynchronous mode and also i am trying different keyloq (EU one).

  • Sorry, long time since I looked at keeloq.

    Q: Do i need to use Asynchronous mode ?
    A: Yes. As indicated at the top of the post I linked to the datarate variation is larger than CC1101 can handle in FIFO (sync) mode. So you have to use async.

    Q: How to calculate data rate ?
    A: The datarate is 1/ bitlength. So if a bit is 10 us long the datarate is 100 kbps.

    Required RX filter bandwidth can be approximated as :Signal BW + 4*ppm xtal*Frequency of operation. A calculation (valid for FSK): Signal BW of = Data rate + 2 x frequency deviation. For OOK the signal BW is higher and dependent on the PA ramping.
  • Thank you so much for help just one question tho.. what do you mean by datarate variation ? (i was thinking that FIFO can handle lets say 61 bytes of memmory and thats why i was thinking that i can use sync mode). Also in that case can you please point me how to solve data handling from GDO pin in my teensy/arduino - is there some good way to solve it (otherwise ill be programming some rising and falling edge detection with timming).
  • keeloq is an old protocol, some of the implementation out there don't have very strict tolerance on the datarate (means that the datarate could vary more than CC1101 can handle)

    To decode you typically have to oversample the output datastream from CC1101 to determine if the received is a '0' or '1'.
  • Thank you ! i will try my best than i will give some info how i did it :)