-
Notifications
You must be signed in to change notification settings - Fork 0
/
smartrf_CC1101.h
63 lines (58 loc) · 2.07 KB
/
smartrf_CC1101.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/* Sync word qualifier mode = 30/32 sync word bits detected */
/* CRC autoflush = false */
/* Channel spacing = 199.951172 */
/* Data format = Normal mode */
/* Data rate = 0.599742 */
/* RX filter BW = 58.035714 */
/* PA ramping = false */
/* Preamble count = 4 */
/* Whitening = false */
/* Address config = No address check */
/* Carrier frequency = 399.999939 */
/* Device address = 0 */
/* TX power = 10 */
/* Manchester enable = false */
/* CRC enable = true */
/* Deviation = 14.282227 */
/* Packet length mode = Fixed packet length mode. Length configured in PKTLEN register */
/* Packet length = 30 */
/* Modulation format = 2-FSK */
/* Base frequency = 399.999939 */
/* Modulated = true */
/* Channel number = 0 */
/***************************************************************
* SmartRF Studio(tm) Export
*
* Radio register settings specifed with C-code
* compatible #define statements.
*
* RF device: CC1101
*
***************************************************************/
#ifndef SMARTRF_CC1101_H
#define SMARTRF_CC1101_H
#define SMARTRF_RADIO_CC1101
#define SMARTRF_SETTING_IOCFG0 0x06
#define SMARTRF_SETTING_FIFOTHR 0x47
#define SMARTRF_SETTING_PKTLEN 0x1E
#define SMARTRF_SETTING_PKTCTRL0 0x04
#define SMARTRF_SETTING_FSCTRL1 0x06
#define SMARTRF_SETTING_FREQ2 0x0F
#define SMARTRF_SETTING_FREQ1 0x62
#define SMARTRF_SETTING_FREQ0 0x76
#define SMARTRF_SETTING_MDMCFG4 0xF3
// The data rate defined by the following 2 registers is set by hand to the value ~200 baud (below documented limit)
// It works fine and gives range ~300ì with just 25ñì wire as antenna
#define SMARTRF_SETTING_MDMCFG3 0x00
#define SMARTRF_SETTING_MDMCFG2 0x03
#define SMARTRF_SETTING_DEVIATN 0x31
#define SMARTRF_SETTING_MCSM0 0x18
#define SMARTRF_SETTING_FOCCFG 0x16
#define SMARTRF_SETTING_WORCTRL 0xFB
#define SMARTRF_SETTING_FSCAL3 0xE9
#define SMARTRF_SETTING_FSCAL2 0x2A
#define SMARTRF_SETTING_FSCAL1 0x00
#define SMARTRF_SETTING_FSCAL0 0x1F
#define SMARTRF_SETTING_TEST2 0x81
#define SMARTRF_SETTING_TEST1 0x35
#endif