RX: CC1120 + Arduino Uno CCRF3 Click https://www.mikroe.com/ccrf-3-click
TX: SX1278 + Arduino Due (sync words 0xAA 0xAA ....)

CC1120 synchronous serial mode
GDO0 pin connected to Arduino Uno digital pin 2 - SERIAL_CLK
GDO2 pin connected to Arduino Uno digital pin 3 - SERIAL_RX
GDO3 pin connected to Arduino Uno digital pin 4 - CARRIER_SENSE
CC1120 AGC_CS_THR register sets threshold for carrier sense.

From CC1120 datasheet:
"In the synchronous serial mode, data is transferred on a two-wire serial interface. The CC112X provides
a clock (IOCFGx.GPIOx_CFG = SERIAL_CLK (8)) that is used to set up new data on the data input
line or sample data on the data output line. Data timing recovery is done automatically. The data pin is
updated on the falling edge of the clock pin at the programmed symbol rate. Sync word
insertion/detection may or may not be active, depending on the sync mode. If sync word detection is
enabled (SYNC_CFG0.SYNC_MODE != 000) the serial clock (SERIAL_CLK) will not be output on the
GPIO before a sync word is transmitted/received. When SYNC_MODE = 000 (blind mode) it is
recommended to transmit a minimum of 4 bytes preamble."

"Synchronous serial mode is often used in applications needing to be backward compatible, and sync
detection is disabled (SYNC_CFG0.SYNC_MODE = 000) since the format of the sync word often do
not match the supported sync word format. Best radio performance is however achieved when
SYNC_MODE != 000. In cases where the packet has a preamble but not a sync word that matches
the sync format supported by the CC112X, the radio can simply use the preamble as a sync word."

"By setting SYNC_CFG0.SYNC_MODE = 010b and SYNC1 = SYNC0 = 0xAA a sync word is detected
somewhere within the preamble and the serial clock will be output on a GPIO when SYNC_EVENT is
asserted"

hws.jpg

cc1120csrx.jpg
https://i.ibb.co/7VPkLyn/cc1120csrx.jpg

#include <SPI.h>
#include "cc1120.h"

#define PRINT_INFO  1

#define pinOfPin(P)\
  (((P)>=0&&(P)<8)?&PIND:(((P)>7&&(P)<14)?&PINB:&PINC))
#define pinIndex(P)((uint8_t)(P>13?P-14:P&7))
#define pinMask(P)((uint8_t)(1<<pinIndex(P)))

#define isHigh(P)((*(pinOfPin(P))& pinMask(P))>0)
#define isLow(P)((*(pinOfPin(P))& pinMask(P))==0)
#define digitalState(P)((uint8_t)isHigh(P))

uint8_t chipStatus = 0;

void setup() {
  Serial.begin(57600);
  pinMode(RESET_PIN, OUTPUT);
  pinMode(SS_PIN, OUTPUT);
  pinMode(GDO0_PIN, INPUT);
  pinMode(GDO2_PIN, INPUT);
  pinMode(GDO3_PIN, INPUT);
  digitalWrite(SS_PIN, HIGH);
  digitalWrite(RESET_PIN, HIGH);

  uint8_t v = 0;
 
  SPI.begin();

  strobeSPI(SNOP);

  // SYNC_CFG0 default 0x17 4 bytes sync word
  // 0x13 3 bytes sync word
  // 0x0B 2 bytes sync word

  writeSPI(IOCFG0, SERIAL_CLK);
  writeSPI(IOCFG2, SERIAL_RX);
  writeSPI(IOCFG3, CARRIER_SENSE);

  writeSPI(SYNC0, SMARTRF_SETTING_SYNC0);
  writeSPI(SYNC1, SMARTRF_SETTING_SYNC1);
  writeSPI(SYNC2, SMARTRF_SETTING_SYNC2);
  writeSPI(SYNC3, SMARTRF_SETTING_SYNC3);
  writeSPI(SYNC_CFG1, SMARTRF_SETTING_SYNC_CFG1);
  writeSPI(MODCFG_DEV_E, SMARTRF_SETTING_MODCFG_DEV_E);
  writeSPI(DCFILT_CFG, SMARTRF_SETTING_DCFILT_CFG);
  writeSPI(PREAMBLE_CFG1, SMARTRF_SETTING_PREAMBLE_CFG1);
  writeSPI(IQIC, SMARTRF_SETTING_IQIC);
  writeSPI(CHAN_BW, SMARTRF_SETTING_CHAN_BW);
  writeSPI(MDMCFG1, SMARTRF_SETTING_MDMCFG1);
  writeSPI(MDMCFG0, SMARTRF_SETTING_MDMCFG0);
  writeSPI(AGC_REF, SMARTRF_SETTING_AGC_REF);
  writeSPI(AGC_CS_THR, SMARTRF_SETTING_AGC_CS_THR);
  writeSPI(AGC_CFG1, SMARTRF_SETTING_AGC_CFG1);
  writeSPI(AGC_CFG0, SMARTRF_SETTING_AGC_CFG0);
  writeSPI(FIFO_CFG, SMARTRF_SETTING_FIFO_CFG);
  writeSPI(FS_CFG, SMARTRF_SETTING_FS_CFG);
  writeSPI(PKT_CFG2, SMARTRF_SETTING_PKT_CFG2);
  writeSPI(PKT_CFG1, SMARTRF_SETTING_PKT_CFG1);
  writeSPI(PKT_CFG0, SMARTRF_SETTING_PKT_CFG0);
  writeSPI(PA_CFG2, SMARTRF_SETTING_PA_CFG2);
  writeSPI(PA_CFG0, SMARTRF_SETTING_PA_CFG0);

  writeExtAddrSPI(IF_MIX_CFG, SMARTRF_SETTING_IF_MIX_CFG);
  writeExtAddrSPI(FREQOFF_CFG, SMARTRF_SETTING_FREQOFF_CFG);
  writeExtAddrSPI(FREQ2, SMARTRF_SETTING_FREQ2);
  writeExtAddrSPI(FREQ1, SMARTRF_SETTING_FREQ1);
  writeExtAddrSPI(FREQ0, SMARTRF_SETTING_FREQ0);
  writeExtAddrSPI(FS_DIG1, SMARTRF_SETTING_FS_DIG1);
  writeExtAddrSPI(FS_DIG0, SMARTRF_SETTING_FS_DIG0);
  writeExtAddrSPI(FS_CAL1, SMARTRF_SETTING_FS_CAL1);
  writeExtAddrSPI(FS_CAL0, SMARTRF_SETTING_FS_CAL0);
  writeExtAddrSPI(FS_DIVTWO, SMARTRF_SETTING_FS_DIVTWO);
  writeExtAddrSPI(FS_DSM0, SMARTRF_SETTING_FS_DSM0);
  writeExtAddrSPI(FS_DVC0, SMARTRF_SETTING_FS_DVC0);
  writeExtAddrSPI(FS_PFD, SMARTRF_SETTING_FS_PFD);
  writeExtAddrSPI(FS_PRE, SMARTRF_SETTING_FS_PRE);
  writeExtAddrSPI(FS_REG_DIV_CML, SMARTRF_SETTING_FS_REG_DIV_CML);
  writeExtAddrSPI(FS_SPARE, SMARTRF_SETTING_FS_SPARE);
  writeExtAddrSPI(FS_VCO0, SMARTRF_SETTING_FS_VCO0);
  writeExtAddrSPI(XOSC5, SMARTRF_SETTING_XOSC5);
  writeExtAddrSPI(XOSC1, SMARTRF_SETTING_XOSC1);
  writeExtAddrSPI(XOSC1, SMARTRF_SETTING_XOSC1);

#ifdef PRINT_INFO
  v = readExtAddrSPI(PARTVERSION);
  Serial.print(F("PARTVERSION "));
  Serial.println(v, HEX);
  v = readExtAddrSPI(PARTNUMBER);
  Serial.print(F("PARTNUMBER "));
  Serial.println(v, HEX);
#endif
 
  strobeSPI(SRX);
  delay(50);

  v = readExtAddrSPI(MARCSTATE);
  Serial.print(F("MARCSTATE "));
  Serial.println(v, BIN);

  attachInterrupt(digitalPinToInterrupt(GDO0_PIN), isr, FALLING);
}

void loop() {
}

void isr() {
  static uint8_t n = 0;
  if (digitalState(GDO3_PIN)) {
    Serial.print(digitalState(GDO2_PIN));
    n++;
    if (n == 63) {
      n = 0;
      Serial.println();
    }
  }
}

uint8_t readSPI(uint8_t addr) {
  digitalWrite(SS_PIN, LOW);
  chipStatus = SPI.transfer(R_BIT | addr);
  uint8_t v = SPI.transfer(0x00);
  digitalWrite(SS_PIN, HIGH);
  return v;
}

void writeSPI(uint8_t addr, uint8_t value) {
  digitalWrite(SS_PIN, LOW);
  chipStatus = SPI.transfer(addr);
  chipStatus = SPI.transfer(value);
  digitalWrite(SS_PIN, HIGH);
}

void strobeSPI(uint8_t cmd)
{
  digitalWrite(SS_PIN, LOW);
  chipStatus = SPI.transfer(R_BIT | cmd);
  digitalWrite(SS_PIN, HIGH);
}

uint8_t readExtAddrSPI(uint8_t addr) {
  uint8_t v;
  digitalWrite(SS_PIN, LOW);
  chipStatus = SPI.transfer(R_BIT | EXT_ADDR);
  SPI.transfer(addr);
  v = SPI.transfer(0xff);
  digitalWrite(SS_PIN, HIGH);
  return v;
}

void writeExtAddrSPI(uint8_t addr, uint8_t value) {
  digitalWrite(SS_PIN, LOW);
  chipStatus = SPI.transfer(EXT_ADDR);
  chipStatus = SPI.transfer(addr);
  chipStatus = SPI.transfer(value);
  digitalWrite(SS_PIN, HIGH);
}

/* Address Config = No address check */
/* Bit Rate = 1.2 kbps */
/* Carrier Frequency = 437.000 MHz */
/* Deviation = 3.997803 */
/* Device Address = 0 */
/* Manchester Enable = false */
/* Modulation Format = 2-FSK */
/* PA Ramping = false */
/* Packet Bit Length = 0 */
/* Packet Length = 3 */
/* Packet Length Mode = Variable */
/* Performance Mode = High Performance */
/* RX Filter BW = 25.000000 */
/* Symbol rate = 1.2 */
/* TX Power = 15 */
/* Whitening = false */
/* Synchronous serial mode */

#ifndef SMARTRF_CC1120_H
#define SMARTRF_CC1120_H

#define SMARTRF_SETTING_SYNC3            0xAA
#define SMARTRF_SETTING_SYNC2            0xAA
#define SMARTRF_SETTING_SYNC1            0xAA
#define SMARTRF_SETTING_SYNC0            0xAA
#define SMARTRF_SETTING_SYNC_CFG1        0x0B
#define SMARTRF_SETTING_MODCFG_DEV_E     0x03
#define SMARTRF_SETTING_DCFILT_CFG       0x1C
#define SMARTRF_SETTING_PREAMBLE_CFG1    0x00
#define SMARTRF_SETTING_IQIC             0xC6
#define SMARTRF_SETTING_CHAN_BW          0x08
#define SMARTRF_SETTING_MDMCFG1          0x06
#define SMARTRF_SETTING_MDMCFG0          0x0A
#define SMARTRF_SETTING_SYMBOL_RATE2     0x73
#define SMARTRF_SETTING_AGC_REF          0x20
#define SMARTRF_SETTING_AGC_CS_THR       0x09
#define SMARTRF_SETTING_AGC_CFG1         0x0A
#define SMARTRF_SETTING_AGC_CFG0         0xCF
#define SMARTRF_SETTING_FIFO_CFG         0x00
#define SMARTRF_SETTING_FS_CFG           0x14
#define SMARTRF_SETTING_PKT_CFG2         0x05
#define SMARTRF_SETTING_PKT_CFG1         0x00
#define SMARTRF_SETTING_PKT_CFG0         0x20
#define SMARTRF_SETTING_PA_CFG2          0x3F
#define SMARTRF_SETTING_PA_CFG0          0x7E
#define SMARTRF_SETTING_IF_MIX_CFG       0x00
#define SMARTRF_SETTING_FREQOFF_CFG      0x22
#define SMARTRF_SETTING_FREQ2            0x6D
#define SMARTRF_SETTING_FREQ1            0x3F
#define SMARTRF_SETTING_FREQ0            0xDF
#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_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_VCO0          0xB4
#define SMARTRF_SETTING_XOSC5            0x0E
#define SMARTRF_SETTING_XOSC1            0x03

// Pins
#define GDO0_PIN        2
#define GDO2_PIN        3
#define GDO3_PIN        4
#define RESET_PIN       7
#define SS_PIN          10

#define R_BIT                 0x80
#define SERIAL_CLK            0x08
#define SERIAL_RX             0x09
#define CARRIER_SENSE_VALID   0x10  
#define CARRIER_SENSE         0x11

// CC1120 registers
#define IOCFG3          0x00
#define IOCFG2          0x01
#define IOCFG1          0x02
#define IOCFG0          0x03
#define SYNC3           0x04
#define SYNC2           0x05
#define SYNC1           0x06
#define SYNC0           0x07
#define SYNC_CFG1       0x08
#define SYNC_CFG0       0x09
#define DEVIATION_M     0x0A
#define MODCFG_DEV_E    0x0B
#define DCFILT_CFG      0x0C
#define PREAMBLE_CFG1   0x0D
#define PREAMBLE_CFG0   0x0E
#define FREQ_IF_CFG     0x0F
#define IQIC            0x10
#define CHAN_BW         0x11
#define MDMCFG1         0x12
#define MDMCFG0         0x13
#define SYMBOL_RATE2    0x14
#define SYMBOL_RATE1    0x15
#define SYMBOL_RATE0    0x16
#define AGC_REF         0x17
#define AGC_CS_THR      0x18
#define AGC_GAIN_ADJUST 0x19
#define AGC_CFG3        0x1A
#define AGC_CFG2        0x1B
#define AGC_CFG1        0x1C
#define AGC_CFG0        0x1D
#define FIFO_CFG        0x1E
#define DEV_ADDR        0x1F
#define SETTLING_CFG    0x20
#define FS_CFG          0x21
#define WOR_CFG1        0x22
#define WOR_CFG0        0x23
#define WOR_EVENT0_MSB  0x24
#define WOR_EVENT0_LSB  0x25
#define PKT_CFG2        0x26
#define PKT_CFG1        0x27
#define PKT_CFG0        0x28
#define RFEND_CFG1      0x29
#define RFEND_CFG2      0x2A
#define PA_CFG2         0x2B
#define PA_CFG1         0x2C
#define PA_CFG0         0x2D
#define PKT_LEN         0x2E
#define EXT_ADDR        0x2F
#define FIFO            0x3F

// Extended register space
#define IF_MIX_CFG        0x00
#define FREQOFF_CFG       0x01
#define FREQ2             0x0C
#define FREQ1             0x0D
#define FREQ0             0x0E
#define FS_DIG1           0x12
#define FS_DIG0           0x13
#define FS_CAL1           0x16
#define FS_CAL0           0x17
#define FS_DIVTWO         0x19
#define FS_DSM0           0x1B
#define FS_DVC0           0x1D
#define FS_PFD            0x1F
#define FS_PRE            0x20
#define FS_REG_DIV_CML    0x21
#define FS_SPARE          0x22
#define FS_VCO0           0x27
#define XOSC5             0x32
#define XOSC1             0x36
#define RSSI1             0x71
#define RSSI0             0x72
#define MARCSTATE         0x73
#define PARTNUMBER        0x8F
#define PARTVERSION       0x90
#define SERIAL_STATUS     0x91
#define MODEM_STATUS1     0x92
#define MODEM_STATUS0     0x93
#define MARC_STATUS1      0x94
#define MARC_STATUS0      0x95
#define NUM_RXBYTES       0xD7
#define FIFO_NUM_RXBYTES  0xD9

// CC1120 command strobes
#define SRES            0x30
#define SFSTXON         0x31
#define SXOFF           0x32
#define SCAL            0x33
#define SRX             0x34
#define STX             0x35
#define SIDLE           0x36
#define SAFC            0x37
#define SWOR            0x38
#define SPWD            0x39
#define SFRX            0x3A
#define SFTX            0x3B
#define SWORRST         0x3C
#define SNOP            0x3D

#endif // CC1120_H