diff options
-rw-r--r-- | software/hhd70dongle/c1101lib.c | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/software/hhd70dongle/c1101lib.c b/software/hhd70dongle/c1101lib.c index b7ea1c7..077b631 100644 --- a/software/hhd70dongle/c1101lib.c +++ b/software/hhd70dongle/c1101lib.c @@ -279,6 +279,50 @@ void c1101_init(void) //c1101_setFrequency(1091741,0,15); } +//Note for comparision: +void c1101_init_w_rfstudiosettings1(void) +{ +// Sync word qualifier mode = 30/32 sync word bits detected +// CRC autoflush = false +// Channel spacing = 199.951172 +// Data format = Normal mode +// Data rate = 9.59587 +// RX filter BW = 58.035714 +// PA ramping = true +// Preamble count = 4 +// Address config = No address check +// Whitening = false +// Carrier frequency = 435.124695 +// Device address = 0 +// TX power = 10 +// Manchester enable = false +// CRC enable = true +// Deviation = 11.901855 +// Modulation format = GFSK +// Base frequency = 435.124695 +// Modulated = true +// Channel number = 0 +// PA table +#define PA_TABLE {0x00,0x12,0x0e,0x34,0x60,0xc5,0xc1,0xc0,} +// +// Rf settings for CC1101 +// + //reset C1101 + c1101_spi_strobe_command(SPIC1101_ADDR_SRES); + _delay_ms(100); + //flush FIFOs + c1101_spi_strobe_command(SPIC1101_ADDR_SFRX); + c1101_spi_strobe_command(SPIC1101_ADDR_SFTX); + //enable analog temperature sensor on GDO0 + c1101_spi_write_register(SPIC1101_ADDR_IOCFG0, 0x80); + //enable RX FIFO interrupt (i.e. GPO2 pulls high if >= FIFOTHR bytes are in RX FIFO) + c1101_spi_write_register(SPIC1101_ADDR_IOCFG2, 0x41 ); //0x40, 0x42, 0x44, 0x47 + + //Values from SmartRFStudio: + +} + + //f_XOSC = 26Mhz // freq: desired_carrier_freq [Hz] *2^16 / f_XOSC // freq_offset: desired frequency offset [Hz] *2^14 / f_XOSC |