Posts

Showing posts with the label CC1120

Tools for inspecting OOK 2

Image
19.5.2021 Tools for inspecting OOK 2 Arduino Due, CC1120 (ccRF 3 click board)   CC1120 ASK/OOK transparent serial mode. CC1120 GPIO3 configured for CARRIER SENSE, triggers when RSSI is above defined threshold (AGC_CS_THR register). GPIO0 configured for SERIAL_RX. #include <SPI.h> #include "cc1120.h" #define PRINT_INFO #undef PRINT_INFO #define DATA_SIZE   512 #define PLOT_SCALE  64 uint16_t data[DATA_SIZE]; // uint16_t is enough for max 32767 uS pulse len // bit 15 = 1 when high pulse, 0 when low pulse volatile bool printData = false; volatile uint16_t idx   = 0; void setup() {   Serial.begin(57600);   pinMode(RESET_PIN, OUTPUT);   pinMode(SS_PIN, OUTPUT);   pinMode(GDO0_PIN, INPUT); // SERIAL_RX   pinMode(GDO3_PIN, INPUT); // CARRIER SENSE   digitalWrite(SS_PIN, HIGH);   digitalWrite(RESET_PIN, HIGH);   memset(data, 0, sizeof(data));     SPI.begin();   strobeSPI(SNOP);   // Sync off   u...

Tools for inspecting OOK

Image
14.5.2021 Tools for inspecting OOK Quhwa doorbell (OOK, PWM) 433.948 MHz CC1120 + CC Debugger + SmartRF Studio 7 Universal Radio Hacker, Audacity, PulseView CC1120 GPO0 connected to Logic Analyzer CH1 (SERIAL_RX) CC1120 GPO2 connected to Logic Analyzer CLK (SERIAL_CLK, not used - CC1120 transparent ASK/OOK mode with carrier sense)   Universal Radio Hacker   Audacity (signal recorded with URH - complex16s) Import raw data   Waveform (dB)   SmartRF Studio CC1120 register settings <?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>CC1120</Devicename>     <Description>Saved configuration data</Description>     <registersettings>         <Register>     ...

Experimenting with CC1120 IOCFG pad analog mode - 2

Image
1.8.2021 Experimenting with CC1120 IOCFG pad analog mode - 2 Hardware: CC1120 + Arduino Due Synchronous serial mode TX (analogWrite), CC1120 IOCFG0 (HIGHZ + pad in analog mode)     #include <SPI.h> #include "cc1120.h" #define PRINT_INFO  1 #define NUM_SAMPLES 120 int16_t waveForm[NUM_SAMPLES] = {     0x44, 0x88, 0xcc, 0x110, 0x154, 0x198, 0x1dc, 0x220, 0x264, 0x2a8,     0x2ec, 0x330, 0x374, 0x3b8, 0x3fc, 0x440, 0x484, 0x4c8, 0x50c, 0x550,     0x594, 0x5d8, 0x61c, 0x660, 0x6a4, 0x6e8, 0x72c, 0x770, 0x7b4, 0x7f8,     0x83c, 0x880, 0x8c4, 0x908, 0x94c, 0x990, 0x9d4, 0xa18, 0xa5c, 0xaa0,     0xae4, 0xb28, 0xb6c, 0xbb0, 0xbf4, 0xc38, 0xc7c, 0xcc0, 0xd04, 0xd48,     0xd8c, 0xdd0, 0xe14, 0xe58, 0xe9c, 0xee0, 0xf24, 0xf68, 0xfac, 0xff0,     0xfac, 0xf68, 0xf24, 0xee0, 0xe9c, 0xe58, 0xe14, 0xdd0, 0xd8c, 0xd48,     0xd04, 0xcc0, 0xc7c, 0xc38, 0xbf4, 0xbb0, 0...

Experimenting with CC1120 IOCFG pad analog mode

Image
 24.7.2021 Experimenting with CC1120 IOCFG pad analog mode Hardware: CC1120 + Arduino Due Due DAC1 in free running mode and connected to CC1120 IOCFG0 (HIGHZ + pad in analog mode). Transparent serial mode TX.   #include <SPI.h> #include "cc1120.h" #define PRINT_INFO  1 #define PERIOD      1500 void setup() {   Serial.begin(9600);   pinMode(RESET_PIN, OUTPUT);   pinMode(SS_PIN, OUTPUT);   digitalWrite(SS_PIN, HIGH);   digitalWrite(RESET_PIN, HIGH);   analogWriteResolution(12);   PMC->PMC_PCER1 = PMC_PCER1_PID38;   DACC->DACC_CR = DACC_CR_SWRST;   DACC->DACC_MR = DACC_MR_TRGEN_DIS                                       | DACC_MR_USER_SEL_CHANNEL1            ...

CC1120/Arduino - CFM for nFSK

Image
 28.1.2021 CC1120/Arduino - CFM for nFSK Arduino Due + CC1120 CFM CFM data output for 4-FSK. Possibly CFM could be used for demodulating N-FSK systems.   #include <SPI.h> #include "cc1120.h" #define PRINT_INFO    1 volatile uint8_t cfmData  = 0; volatile bool mChg        = false; void setup() {   Serial.begin(115200);   pinMode(RESET_PIN, OUTPUT);   pinMode(SS_PIN, OUTPUT);   pinMode(GDO0_PIN, INPUT);   pinMode(GDO3_PIN, INPUT);   digitalWrite(SS_PIN, HIGH);   digitalWrite(RESET_PIN, HIGH);     SPI.begin();   strobeSPI(SNOP);   // Preamble off   uint8_t v = readSPI(PREAMBLE_CFG0);   bitClear(v, 5);   writeSPI(PREAMBLE_CFG0, v);   // Sync off   v = readSPI(SYNC_CFG0);   v &= B11100011;   writeSPI(SYNC_CFG0, v);   // CRC off   v = readSPI(PKT_CFG1);   v &= B11110011;   writeSPI(PKT_CFG1, v);   writ...