|
Mbed OS Reference
|
Loading...
Searching...
No Matches
19#ifndef __SX1272_REGS_LORA_H__
20#define __SX1272_REGS_LORA_H__
27#define REG_LR_FIFO 0x00
29#define REG_LR_OPMODE 0x01
30#define REG_LR_FRFMSB 0x06
31#define REG_LR_FRFMID 0x07
32#define REG_LR_FRFLSB 0x08
34#define REG_LR_PACONFIG 0x09
35#define REG_LR_PARAMP 0x0A
36#define REG_LR_OCP 0x0B
38#define REG_LR_LNA 0x0C
40#define REG_LR_FIFOADDRPTR 0x0D
41#define REG_LR_FIFOTXBASEADDR 0x0E
42#define REG_LR_FIFORXBASEADDR 0x0F
43#define REG_LR_FIFORXCURRENTADDR 0x10
44#define REG_LR_IRQFLAGSMASK 0x11
45#define REG_LR_IRQFLAGS 0x12
46#define REG_LR_RXNBBYTES 0x13
47#define REG_LR_RXHEADERCNTVALUEMSB 0x14
48#define REG_LR_RXHEADERCNTVALUELSB 0x15
49#define REG_LR_RXPACKETCNTVALUEMSB 0x16
50#define REG_LR_RXPACKETCNTVALUELSB 0x17
51#define REG_LR_MODEMSTAT 0x18
52#define REG_LR_PKTSNRVALUE 0x19
53#define REG_LR_PKTRSSIVALUE 0x1A
54#define REG_LR_RSSIVALUE 0x1B
55#define REG_LR_HOPCHANNEL 0x1C
56#define REG_LR_MODEMCONFIG1 0x1D
57#define REG_LR_MODEMCONFIG2 0x1E
58#define REG_LR_SYMBTIMEOUTLSB 0x1F
59#define REG_LR_PREAMBLEMSB 0x20
60#define REG_LR_PREAMBLELSB 0x21
61#define REG_LR_PAYLOADLENGTH 0x22
62#define REG_LR_PAYLOADMAXLENGTH 0x23
63#define REG_LR_HOPPERIOD 0x24
64#define REG_LR_FIFORXBYTEADDR 0x25
65#define REG_LR_FEIMSB 0x28
66#define REG_LR_FEIMID 0x29
67#define REG_LR_FEILSB 0x2A
68#define REG_LR_RSSIWIDEBAND 0x2C
69#define REG_LR_DETECTOPTIMIZE 0x31
70#define REG_LR_INVERTIQ 0x33
71#define REG_LR_DETECTIONTHRESHOLD 0x37
72#define REG_LR_SYNCWORD 0x39
73#define REG_LR_INVERTIQ2 0x3B
77#define REG_LR_DIOMAPPING1 0x40
78#define REG_LR_DIOMAPPING2 0x41
80#define REG_LR_VERSION 0x42
82#define REG_LR_AGCREF 0x43
83#define REG_LR_AGCTHRESH1 0x44
84#define REG_LR_AGCTHRESH2 0x45
85#define REG_LR_AGCTHRESH3 0x46
86#define REG_LR_PLLHOP 0x4B
87#define REG_LR_TCXO 0x58
88#define REG_LR_PADAC 0x5A
89#define REG_LR_PLL 0x5C
90#define REG_LR_PLLLOWPN 0x5E
91#define REG_LR_FORMERTEMP 0x6C
106#define RFLR_OPMODE_LONGRANGEMODE_MASK 0x7F
107#define RFLR_OPMODE_LONGRANGEMODE_OFF 0x00
108#define RFLR_OPMODE_LONGRANGEMODE_ON 0x80
110#define RFLR_OPMODE_ACCESSSHAREDREG_MASK 0xBF
111#define RFLR_OPMODE_ACCESSSHAREDREG_ENABLE 0x40
112#define RFLR_OPMODE_ACCESSSHAREDREG_DISABLE 0x00
114#define RFLR_OPMODE_MASK 0xF8
115#define RFLR_OPMODE_SLEEP 0x00
116#define RFLR_OPMODE_STANDBY 0x01
117#define RFLR_OPMODE_SYNTHESIZER_TX 0x02
118#define RFLR_OPMODE_TRANSMITTER 0x03
119#define RFLR_OPMODE_SYNTHESIZER_RX 0x04
120#define RFLR_OPMODE_RECEIVER 0x05
122#define RFLR_OPMODE_RECEIVER_SINGLE 0x06
123#define RFLR_OPMODE_CAD 0x07
128#define RFLR_FRFMSB_915_MHZ 0xE4
129#define RFLR_FRFMID_915_MHZ 0xC0
130#define RFLR_FRFLSB_915_MHZ 0x00
135#define RFLR_PACONFIG_PASELECT_MASK 0x7F
136#define RFLR_PACONFIG_PASELECT_PABOOST 0x80
137#define RFLR_PACONFIG_PASELECT_RFO 0x00
139#define RFLR_PACONFIG_OUTPUTPOWER_MASK 0xF0
144#define RFLR_PARAMP_LOWPNTXPLL_MASK 0xE0
145#define RFLR_PARAMP_LOWPNTXPLL_OFF 0x10
146#define RFLR_PARAMP_LOWPNTXPLL_ON 0x00
148#define RFLR_PARAMP_MASK 0xF0
149#define RFLR_PARAMP_3400_US 0x00
150#define RFLR_PARAMP_2000_US 0x01
151#define RFLR_PARAMP_1000_US 0x02
152#define RFLR_PARAMP_0500_US 0x03
153#define RFLR_PARAMP_0250_US 0x04
154#define RFLR_PARAMP_0125_US 0x05
155#define RFLR_PARAMP_0100_US 0x06
156#define RFLR_PARAMP_0062_US 0x07
157#define RFLR_PARAMP_0050_US 0x08
158#define RFLR_PARAMP_0040_US 0x09
159#define RFLR_PARAMP_0031_US 0x0A
160#define RFLR_PARAMP_0025_US 0x0B
161#define RFLR_PARAMP_0020_US 0x0C
162#define RFLR_PARAMP_0015_US 0x0D
163#define RFLR_PARAMP_0012_US 0x0E
164#define RFLR_PARAMP_0010_US 0x0F
169#define RFLR_OCP_MASK 0xDF
170#define RFLR_OCP_ON 0x20
171#define RFLR_OCP_OFF 0x00
173#define RFLR_OCP_TRIM_MASK 0xE0
174#define RFLR_OCP_TRIM_045_MA 0x00
175#define RFLR_OCP_TRIM_050_MA 0x01
176#define RFLR_OCP_TRIM_055_MA 0x02
177#define RFLR_OCP_TRIM_060_MA 0x03
178#define RFLR_OCP_TRIM_065_MA 0x04
179#define RFLR_OCP_TRIM_070_MA 0x05
180#define RFLR_OCP_TRIM_075_MA 0x06
181#define RFLR_OCP_TRIM_080_MA 0x07
182#define RFLR_OCP_TRIM_085_MA 0x08
183#define RFLR_OCP_TRIM_090_MA 0x09
184#define RFLR_OCP_TRIM_095_MA 0x0A
185#define RFLR_OCP_TRIM_100_MA 0x0B
186#define RFLR_OCP_TRIM_105_MA 0x0C
187#define RFLR_OCP_TRIM_110_MA 0x0D
188#define RFLR_OCP_TRIM_115_MA 0x0E
189#define RFLR_OCP_TRIM_120_MA 0x0F
190#define RFLR_OCP_TRIM_130_MA 0x10
191#define RFLR_OCP_TRIM_140_MA 0x11
192#define RFLR_OCP_TRIM_150_MA 0x12
193#define RFLR_OCP_TRIM_160_MA 0x13
194#define RFLR_OCP_TRIM_170_MA 0x14
195#define RFLR_OCP_TRIM_180_MA 0x15
196#define RFLR_OCP_TRIM_190_MA 0x16
197#define RFLR_OCP_TRIM_200_MA 0x17
198#define RFLR_OCP_TRIM_210_MA 0x18
199#define RFLR_OCP_TRIM_220_MA 0x19
200#define RFLR_OCP_TRIM_230_MA 0x1A
201#define RFLR_OCP_TRIM_240_MA 0x1B
206#define RFLR_LNA_GAIN_MASK 0x1F
207#define RFLR_LNA_GAIN_G1 0x20
208#define RFLR_LNA_GAIN_G2 0x40
209#define RFLR_LNA_GAIN_G3 0x60
210#define RFLR_LNA_GAIN_G4 0x80
211#define RFLR_LNA_GAIN_G5 0xA0
212#define RFLR_LNA_GAIN_G6 0xC0
214#define RFLR_LNA_BOOST_MASK 0xFC
215#define RFLR_LNA_BOOST_OFF 0x00
216#define RFLR_LNA_BOOST_ON 0x03
221#define RFLR_FIFOADDRPTR 0x00
226#define RFLR_FIFOTXBASEADDR 0x80
231#define RFLR_FIFORXBASEADDR 0x00
240#define RFLR_IRQFLAGS_RXTIMEOUT_MASK 0x80
241#define RFLR_IRQFLAGS_RXDONE_MASK 0x40
242#define RFLR_IRQFLAGS_PAYLOADCRCERROR_MASK 0x20
243#define RFLR_IRQFLAGS_VALIDHEADER_MASK 0x10
244#define RFLR_IRQFLAGS_TXDONE_MASK 0x08
245#define RFLR_IRQFLAGS_CADDONE_MASK 0x04
246#define RFLR_IRQFLAGS_FHSSCHANGEDCHANNEL_MASK 0x02
247#define RFLR_IRQFLAGS_CADDETECTED_MASK 0x01
252#define RFLR_IRQFLAGS_RXTIMEOUT 0x80
253#define RFLR_IRQFLAGS_RXDONE 0x40
254#define RFLR_IRQFLAGS_PAYLOADCRCERROR 0x20
255#define RFLR_IRQFLAGS_VALIDHEADER 0x10
256#define RFLR_IRQFLAGS_TXDONE 0x08
257#define RFLR_IRQFLAGS_CADDONE 0x04
258#define RFLR_IRQFLAGS_FHSSCHANGEDCHANNEL 0x02
259#define RFLR_IRQFLAGS_CADDETECTED 0x01
284#define RFLR_MODEMSTAT_RX_CR_MASK 0x1F
285#define RFLR_MODEMSTAT_MODEM_STATUS_MASK 0xE0
302#define RFLR_HOPCHANNEL_PLL_LOCK_TIMEOUT_MASK 0x7F
303#define RFLR_HOPCHANNEL_PLL_LOCK_FAIL 0x80
304#define RFLR_HOPCHANNEL_PLL_LOCK_SUCCEED 0x00
306#define RFLR_HOPCHANNEL_CRCONPAYLOAD_MASK 0xBF
307#define RFLR_HOPCHANNEL_CRCONPAYLOAD_ON 0x40
308#define RFLR_HOPCHANNEL_CRCONPAYLOAD_OFF 0x00
310#define RFLR_HOPCHANNEL_CHANNEL_MASK 0x3F
315#define RFLR_MODEMCONFIG1_BW_MASK 0x3F
316#define RFLR_MODEMCONFIG1_BW_125_KHZ 0x00
317#define RFLR_MODEMCONFIG1_BW_250_KHZ 0x40
318#define RFLR_MODEMCONFIG1_BW_500_KHZ 0x80
320#define RFLR_MODEMCONFIG1_CODINGRATE_MASK 0xC7
321#define RFLR_MODEMCONFIG1_CODINGRATE_4_5 0x08
322#define RFLR_MODEMCONFIG1_CODINGRATE_4_6 0x10
323#define RFLR_MODEMCONFIG1_CODINGRATE_4_7 0x18
324#define RFLR_MODEMCONFIG1_CODINGRATE_4_8 0x20
326#define RFLR_MODEMCONFIG1_IMPLICITHEADER_MASK 0xFB
327#define RFLR_MODEMCONFIG1_IMPLICITHEADER_ON 0x04
328#define RFLR_MODEMCONFIG1_IMPLICITHEADER_OFF 0x00
330#define RFLR_MODEMCONFIG1_RXPAYLOADCRC_MASK 0xFD
331#define RFLR_MODEMCONFIG1_RXPAYLOADCRC_ON 0x02
332#define RFLR_MODEMCONFIG1_RXPAYLOADCRC_OFF 0x00
334#define RFLR_MODEMCONFIG1_LOWDATARATEOPTIMIZE_MASK 0xFE
335#define RFLR_MODEMCONFIG1_LOWDATARATEOPTIMIZE_ON 0x01
336#define RFLR_MODEMCONFIG1_LOWDATARATEOPTIMIZE_OFF 0x00
341#define RFLR_MODEMCONFIG2_SF_MASK 0x0F
342#define RFLR_MODEMCONFIG2_SF_6 0x60
343#define RFLR_MODEMCONFIG2_SF_7 0x70
344#define RFLR_MODEMCONFIG2_SF_8 0x80
345#define RFLR_MODEMCONFIG2_SF_9 0x90
346#define RFLR_MODEMCONFIG2_SF_10 0xA0
347#define RFLR_MODEMCONFIG2_SF_11 0xB0
348#define RFLR_MODEMCONFIG2_SF_12 0xC0
350#define RFLR_MODEMCONFIG2_TXCONTINUOUSMODE_MASK 0xF7
351#define RFLR_MODEMCONFIG2_TXCONTINUOUSMODE_ON 0x08
352#define RFLR_MODEMCONFIG2_TXCONTINUOUSMODE_OFF 0x00
354#define RFLR_MODEMCONFIG2_AGCAUTO_MASK 0xFB
355#define RFLR_MODEMCONFIG2_AGCAUTO_ON 0x04
356#define RFLR_MODEMCONFIG2_AGCAUTO_OFF 0x00
358#define RFLR_MODEMCONFIG2_SYMBTIMEOUTMSB_MASK 0xFC
359#define RFLR_MODEMCONFIG2_SYMBTIMEOUTMSB 0x00
364#define RFLR_SYMBTIMEOUTLSB_SYMBTIMEOUT 0x64
369#define RFLR_PREAMBLELENGTHMSB 0x00
374#define RFLR_PREAMBLELENGTHLSB 0x08
379#define RFLR_PAYLOADLENGTH 0x0E
384#define RFLR_PAYLOADMAXLENGTH 0xFF
389#define RFLR_HOPPERIOD_FREQFOPPINGPERIOD 0x00
414#define RFLR_DETECTIONOPTIMIZE_MASK 0xF8
415#define RFLR_DETECTIONOPTIMIZE_SF7_TO_SF12 0x03
416#define RFLR_DETECTIONOPTIMIZE_SF6 0x05
421#define RFLR_INVERTIQ_RX_MASK 0xBF
422#define RFLR_INVERTIQ_RX_OFF 0x00
423#define RFLR_INVERTIQ_RX_ON 0x40
424#define RFLR_INVERTIQ_TX_MASK 0xFE
425#define RFLR_INVERTIQ_TX_OFF 0x01
426#define RFLR_INVERTIQ_TX_ON 0x00
431#define RFLR_DETECTIONTHRESH_SF7_TO_SF12 0x0A
432#define RFLR_DETECTIONTHRESH_SF6 0x0C
437#define RFLR_INVERTIQ2_ON 0x19
438#define RFLR_INVERTIQ2_OFF 0x1D
443#define RFLR_DIOMAPPING1_DIO0_MASK 0x3F
444#define RFLR_DIOMAPPING1_DIO0_00 0x00
445#define RFLR_DIOMAPPING1_DIO0_01 0x40
446#define RFLR_DIOMAPPING1_DIO0_10 0x80
447#define RFLR_DIOMAPPING1_DIO0_11 0xC0
449#define RFLR_DIOMAPPING1_DIO1_MASK 0xCF
450#define RFLR_DIOMAPPING1_DIO1_00 0x00
451#define RFLR_DIOMAPPING1_DIO1_01 0x10
452#define RFLR_DIOMAPPING1_DIO1_10 0x20
453#define RFLR_DIOMAPPING1_DIO1_11 0x30
455#define RFLR_DIOMAPPING1_DIO2_MASK 0xF3
456#define RFLR_DIOMAPPING1_DIO2_00 0x00
457#define RFLR_DIOMAPPING1_DIO2_01 0x04
458#define RFLR_DIOMAPPING1_DIO2_10 0x08
459#define RFLR_DIOMAPPING1_DIO2_11 0x0C
461#define RFLR_DIOMAPPING1_DIO3_MASK 0xFC
462#define RFLR_DIOMAPPING1_DIO3_00 0x00
463#define RFLR_DIOMAPPING1_DIO3_01 0x01
464#define RFLR_DIOMAPPING1_DIO3_10 0x02
465#define RFLR_DIOMAPPING1_DIO3_11 0x03
470#define RFLR_DIOMAPPING2_DIO4_MASK 0x3F
471#define RFLR_DIOMAPPING2_DIO4_00 0x00
472#define RFLR_DIOMAPPING2_DIO4_01 0x40
473#define RFLR_DIOMAPPING2_DIO4_10 0x80
474#define RFLR_DIOMAPPING2_DIO4_11 0xC0
476#define RFLR_DIOMAPPING2_DIO5_MASK 0xCF
477#define RFLR_DIOMAPPING2_DIO5_00 0x00
478#define RFLR_DIOMAPPING2_DIO5_01 0x10
479#define RFLR_DIOMAPPING2_DIO5_10 0x20
480#define RFLR_DIOMAPPING2_DIO5_11 0x30
482#define RFLR_DIOMAPPING2_MAP_MASK 0xFE
483#define RFLR_DIOMAPPING2_MAP_PREAMBLEDETECT 0x01
484#define RFLR_DIOMAPPING2_MAP_RSSI 0x00
509#define RFLR_PLLHOP_FASTHOP_MASK 0x7F
510#define RFLR_PLLHOP_FASTHOP_ON 0x80
511#define RFLR_PLLHOP_FASTHOP_OFF 0x00
516#define RFLR_TCXO_TCXOINPUT_MASK 0xEF
517#define RFLR_TCXO_TCXOINPUT_ON 0x10
518#define RFLR_TCXO_TCXOINPUT_OFF 0x00
523#define RFLR_PADAC_20DBM_MASK 0xF8
524#define RFLR_PADAC_20DBM_ON 0x07
525#define RFLR_PADAC_20DBM_OFF 0x04
530#define RFLR_PLL_BANDWIDTH_MASK 0x3F
531#define RFLR_PLL_BANDWIDTH_75 0x00
532#define RFLR_PLL_BANDWIDTH_150 0x40
533#define RFLR_PLL_BANDWIDTH_225 0x80
534#define RFLR_PLL_BANDWIDTH_300 0xC0
539#define RFLR_PLLLOWPN_BANDWIDTH_MASK 0x3F
540#define RFLR_PLLLOWPN_BANDWIDTH_75 0x00
541#define RFLR_PLLLOWPN_BANDWIDTH_150 0x40
542#define RFLR_PLLLOWPN_BANDWIDTH_225 0x80
543#define RFLR_PLLLOWPN_BANDWIDTH_300 0xC0