UoS³ Flight Computer Firmware
 All Data Structures Files Functions Groups Pages
cc1120_rx_sniff_mode_reg_config.h
Go to the documentation of this file.
1 //******************************************************************************
4 //
5 // Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com/
6 //
7 // Redistribution and use in source and binary forms, with or without
8 // modification, are permitted provided that the following conditions
9 // are met:
10 //
11 // Redistributions of source code must retain the above copyright
12 // notice, this list of conditions and the following disclaimer.
13 //
14 // Redistributions in binary form must reproduce the above copyright
15 // notice, this list of conditions and the following disclaimer in the
16 // documentation and/or other materials provided with the distribution.
17 //
18 // Neither the name of Texas Instruments Incorporated nor the names of
19 // its contributors may be used to endorse or promote products derived
20 // from this software without specific prior written permission.
21 //
22 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
25 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
26 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
27 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
28 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
29 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
30 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
32 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 //*****************************************************************************/
34 
35 #ifndef CC1120_RX_SNIFF_MODE_REG_CONFIG_H
36 #define CC1120_RX_SNIFF_MODE_REG_CONFIG_H
37 
38 #ifdef __cplusplus
39 extern "C" {
40 #endif
41 
42 /******************************************************************************
43  * INCLUDES
44  */
45 #include "../firmware.h"
46 #include "../cc1125/cc112x_spi.h"
47 
48 
49 /******************************************************************************
50  * VARIABLES
51  */
52 #ifdef CONFIG_1
53 
54 // RX filter BW = 50.000000
55 // Address config = No address check
56 // Packet length = 125
57 // Symbol rate = 1.2
58 // PA ramping = true
59 // Performance mode = High Performance
60 // Carrier frequency = 145.500000
61 // Crystal: 38.400
62 // Bit rate = 1.2
63 // Packet bit length = 0
64 // Whitening = false
65 // Manchester enable = false
66 // Modulation format = 2-FSK
67 // Packet length mode = Variable
68 // Device address = 0
69 // TX power = 15
70 // Deviation = 20.019531
71 // Rf settings for CC1120
72 static const registerSetting_t preferredSettings[] = {
73  {CC112X_IOCFG3, 0x59},
74  {CC112X_IOCFG2, 0x13},
75  {CC112X_IOCFG1, 0xB0},
76  {CC112X_IOCFG0, 0x06},
77  {CC112X_SYNC_CFG1, 0x0B},
78  {CC112X_DEVIATION_M, 0x48},
79  {CC112X_MODCFG_DEV_E, 0x05},
80  {CC112X_DCFILT_CFG, 0x1C},
81  {CC112X_IQIC, 0x00},
82  {CC112X_CHAN_BW, 0x04},
83  {CC112X_MDMCFG0, 0x05},
84  {CC112X_AGC_CS_THR, 0xF5},
85  {CC112X_AGC_CFG1, 0xA0},
86  {CC112X_SETTLING_CFG, 0x03},
87  {CC112X_FS_CFG, 0x1B},
88  {CC112X_WOR_CFG0, 0x20},
89  {CC112X_WOR_EVENT0_MSB, 0x02},
90  {CC112X_WOR_EVENT0_LSB, 0x14},
91  {CC112X_PKT_CFG0, 0x20},
92  {CC112X_PKT_CFG1, 0x05},
93  {CC112X_RFEND_CFG0, 0x09},
94  {CC112X_PKT_LEN, 0x7D},
95  {CC112X_IF_MIX_CFG, 0x00},
96  {CC112X_FREQOFF_CFG, 0x22},
97  {CC112X_FREQ2, 0x5A},
98  {CC112X_FREQ1, 0xF0},
99  {CC112X_FREQ0, 0x00},
100  {CC112X_FS_DIG1, 0x00},
101  {CC112X_FS_DIG0, 0x5F},
102  {CC112X_FS_CAL1, 0x40},
103  {CC112X_FS_CAL0, 0x0E},
104  {CC112X_FS_DIVTWO, 0x03},
105  {CC112X_FS_DSM0, 0x33},
106  {CC112X_FS_DVC0, 0x17},
107  {CC112X_FS_PFD, 0x50},
108  {CC112X_FS_PRE, 0x6E},
109  {CC112X_FS_REG_DIV_CML, 0x14},
110  {CC112X_FS_SPARE, 0xAC},
111  {CC112X_FS_VCO0, 0xB4},
112  {CC112X_XOSC5, 0x0E},
113  {CC112X_XOSC1, 0x03},
114 };
115 
116 static const registerSetting_t preferredSettings_cw[]=
117 {
118  {CC112X_IOCFG3, 0x59},
119  {CC112X_IOCFG2, 0x13},
120  {CC112X_IOCFG1, 0xB0},
121  {CC112X_IOCFG0, 0x06},
122  {CC112X_SYNC_CFG1, 0x08},
123  {CC112X_DEVIATION_M, 0xB4},
124  {CC112X_MODCFG_DEV_E, 0x0A},
125  {CC112X_DCFILT_CFG, 0x1C},
126  {CC112X_PREAMBLE_CFG1, 0x00},
127  {CC112X_FREQ_IF_CFG, 0x35},
128  {CC112X_IQIC, 0xC6},
129  {CC112X_CHAN_BW, 0x10},
130  {CC112X_MDMCFG1, 0x06},
131  {CC112X_MDMCFG0, 0x05},
132  {CC112X_SYMBOL_RATE2, 0x40},
133  {CC112X_SYMBOL_RATE1, 0x62},
134  {CC112X_SYMBOL_RATE0, 0x4E},
135  {CC112X_AGC_REF, 0x20},
136  {CC112X_AGC_CS_THR, 0x19},
137  {CC112X_AGC_CFG1, 0xA9},
138  {CC112X_AGC_CFG0, 0xCF},
139  {CC112X_FIFO_CFG, 0x00},
140  {CC112X_SETTLING_CFG, 0x03},
141  {CC112X_FS_CFG, 0x1B},
142  {CC112X_PKT_CFG2, 0x05},
143  {CC112X_PKT_CFG1, 0x00},
144  {CC112X_PKT_CFG0, 0x20},
145  {CC112X_PA_CFG2, 0x34},
146  {CC112X_PA_CFG0, 0x7E},
147  {CC112X_IF_MIX_CFG, 0x00},
148  {CC112X_FREQOFF_CFG, 0x22},
149  {CC112X_CFM_DATA_CFG, 0x01},
150  {CC112X_FREQ2, 0x5A},
151  {CC112X_FREQ1, 0xEF},
152  {CC112X_FREQ0, 0xFF},
153  {CC112X_IF_ADC0, 0x05},
154  {CC112X_FS_DIG1, 0x00},
155  {CC112X_FS_DIG0, 0x5F},
156  {CC112X_FS_CAL0, 0x0E},
157  {CC112X_FS_DIVTWO, 0x03},
158  {CC112X_FS_DSM0, 0x33},
159  {CC112X_FS_DVC0, 0x17},
160  {CC112X_FS_PFD, 0x50},
161  {CC112X_FS_PRE, 0x6E},
162  {CC112X_FS_REG_DIV_CML, 0x14},
163  {CC112X_FS_SPARE, 0xAC},
164  {CC112X_XOSC5, 0x0E},
165  {CC112X_XOSC3, 0xC7},
166  {CC112X_XOSC1, 0x07},
167  {CC112X_SERIAL_STATUS, 0x08},
168 };
169 
170 #endif
171 
172 #ifdef CONFIG_2
173 
174 // RX filter BW = 50.000000
175 // Address config = No address check
176 // Packet length = 125
177 // Symbol rate = 1.2
178 // PA ramping = true
179 // Performance mode = High Performance
180 // Carrier frequency = 435.500000
181 // Crystal: 38.400
182 // Bit rate = 1.2
183 // Packet bit length = 0
184 // Whitening = false
185 // Manchester enable = false
186 // Modulation format = 2-FSK
187 // Packet length mode = Variable
188 // Device address = 0
189 // TX power = 15
190 // Deviation = 20.019531
191 // Rf settings for CC1120
192 static const registerSetting_t preferredSettings[] = {
193  {CC112X_IOCFG3, 0x59},
194  {CC112X_IOCFG2, 0x13},
195  {CC112X_IOCFG1, 0xB0},
196  {CC112X_IOCFG0, 0x06},
197  {CC112X_SYNC_CFG1, 0x0B},
198  {CC112X_DEVIATION_M, 0x48},
199  {CC112X_MODCFG_DEV_E, 0x05},
200  {CC112X_DCFILT_CFG, 0x1C},
201  {CC112X_IQIC, 0x00},
202  {CC112X_CHAN_BW, 0x04},
203  {CC112X_MDMCFG0, 0x05},
204  {CC112X_AGC_CS_THR, 0xF5},
205  {CC112X_AGC_CFG1, 0xA0},
206  {CC112X_SETTLING_CFG, 0x03},
207  {CC112X_FS_CFG, 0x14},
208  {CC112X_WOR_CFG0, 0x20},
209  {CC112X_WOR_EVENT0_MSB, 0x02},
210  {CC112X_WOR_EVENT0_LSB, 0x14},
211  {CC112X_PKT_CFG0, 0x20},
212  {CC112X_PKT_CFG1, 0x05},
213  {CC112X_RFEND_CFG0, 0x09},
214  {CC112X_PKT_LEN, 0x7D},
215  {CC112X_IF_MIX_CFG, 0x00},
216  {CC112X_FREQOFF_CFG, 0x22},
217  {CC112X_FREQ2, 0x5A},
218  {CC112X_FREQ1, 0xBA},
219  {CC112X_FREQ0, 0xAA},
220  {CC112X_FS_DIG1, 0x00},
221  {CC112X_FS_DIG0, 0x5F},
222  {CC112X_FS_CAL1, 0x40},
223  {CC112X_FS_CAL0, 0x0E},
224  {CC112X_FS_DIVTWO, 0x03},
225  {CC112X_FS_DSM0, 0x33},
226  {CC112X_FS_DVC0, 0x17},
227  {CC112X_FS_PFD, 0x50},
228  {CC112X_FS_PRE, 0x6E},
229  {CC112X_FS_REG_DIV_CML, 0x14},
230  {CC112X_FS_SPARE, 0xAC},
231  {CC112X_FS_VCO0, 0xB4},
232  {CC112X_XOSC5, 0x0E},
233  {CC112X_XOSC1, 0x03},
234 };
235 #endif
236 
237 #ifdef __cplusplus
238 }
239 #endif
240 
241 #endif