From 7805e26a729ae96add7d8a467682dd8ccb13fbe2 Mon Sep 17 00:00:00 2001 From: Bernhard Tittelbach Date: Sat, 19 May 2012 20:12:36 +0000 Subject: led on only during send git-svn-id: https://svn.spreadspace.org/mur.sat@438 7de4ea59-55d0-425e-a1af-a3118ea81d4c --- software/hhd70dongle/c1101lib.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'software/hhd70dongle/c1101lib.c') diff --git a/software/hhd70dongle/c1101lib.c b/software/hhd70dongle/c1101lib.c index a29974e..872c211 100644 --- a/software/hhd70dongle/c1101lib.c +++ b/software/hhd70dongle/c1101lib.c @@ -174,7 +174,7 @@ int spi_c1101_write_txfifo(char *buffer, int len) sb = spi_c1101_write_byte_ok_get_status(SPIC1101_ADDR_FIFO_WRITE_BURST); if (sb < 0) return -1; - uint8_t debug_sb[6]; + //~ uint8_t debug_sb[6]; while (len-- > 0 && SPIC1101_SB_FIFO_BYTES_AVAILABLE(sb) > 2) { //~ usb_rawhid_send((uint8_t*)"TXFifo bytes available",255); @@ -214,9 +214,10 @@ void c1101_init(void) // FSCTRL1 Frequency Synthesizer Control spi_c1101_write_register(SPIC1101_ADDR_FSCTRL1, 0x06); // FREQn Frequency Control Words - spi_c1101_write_register(SPIC1101_ADDR_FREQ2, 0x10); - spi_c1101_write_register(SPIC1101_ADDR_FREQ1, 0xD3); - spi_c1101_write_register(SPIC1101_ADDR_FREQ0, 0xB1); + spi_c1101_write_register(SPIC1101_ADDR_FREQ2, 0x10); //should be 435.125 mhz + spi_c1101_write_register(SPIC1101_ADDR_FREQ1, 0xBF); + spi_c1101_write_register(SPIC1101_ADDR_FREQ0, 0xEF); + spi_c1101_write_register(SPIC1101_ADDR_FSCTRL0, 0); //frequency offset // MDMCFGn Modem Configuration spi_c1101_write_register(SPIC1101_ADDR_MDMCFG4, 0xF8); spi_c1101_write_register(SPIC1101_ADDR_MDMCFG3, 0x83); @@ -241,6 +242,7 @@ void c1101_init(void) //c1101_setFrequency(1091741,0,15); } +//f_XOSC = 25,978016865 Mhz // freq: desired_carrier_freq [Hz] *2^16 / f_XOSC // freq_offset: desired frequency offset [Hz] *2^14 / f_XOSC // if_freq: desired intermidiate rx frequency [Hz] *2^10 / f_XOSC -- cgit v1.2.3