Skip to content

Commit bb80385

Browse files
authored
Merge pull request #12741 from kivaisan/add_lora_drivers
Add Semtech Lora radio drivers
2 parents 8fea81a + a1a98ab commit bb80385

20 files changed

+11171
-0
lines changed

components/lora/COMPONENT_SX126X/SX126X_LoRaRadio.cpp

Lines changed: 1342 additions & 0 deletions
Large diffs are not rendered by default.

components/lora/COMPONENT_SX126X/SX126X_LoRaRadio.h

Lines changed: 408 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
Sleep Modes:
2+
3+
The SX126X series LoRa radios define two different sleep modes, namely:
4+
5+
i) Sleep mode with Cold Start (default mode in Mbed LoRaWAN stack)
6+
ii) Sleep mode with Warm Start
7+
8+
9+
Sleep mode with Warm Start:
10+
This is the default sleep mode for this driver. Radio configurations are retained in this mode.
11+
Typical power consumption in this mode is '600 nA'.
12+
13+
14+
Sleep mode with Cold Start:
15+
The driver can be configured to sleep with cold startup. This mode is the lowest power consuming state
16+
for the SX126X series radios. No configurations are retained in this mode, that's why our driver takes
17+
extra measures to keep backups of the configuration in the RAM. Typical power consumption in this mode
18+
is '160 nA'. The radio takes about 3.5 milliseconds to wakeup properly because upon going to sleep all
19+
components gets turned off. The radio thread blocks for that period of time. However, to reduce the impact
20+
of this wakeup time on the time critical operations, the stack shouldn't put the radio to standby rather than
21+
sleep before performing time critical operations. Mbed OS LoRaWAN stack handles this automatically which means
22+
that the user can safely use sleep mode with cold start.
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"name": "SX126X-lora-driver",
3+
"config": {
4+
"spi-frequency": {
5+
"help": "SPI frequency, Default: 16 MHz",
6+
"value": 16000000
7+
},
8+
"buffer-size": {
9+
"help": "Max. buffer size the radio can handle, Default: 255 B",
10+
"value": 255
11+
},
12+
"boost-rx": {
13+
"help": "Increases sensitivity at the cost of power ~2mA for around ~3dB in sensitivity 0 = disabled, 1 = enabled",
14+
"value": 0
15+
},
16+
"regulator-mode": {
17+
"help": "Default: DCDC (low power, high BOM). Alternatively, LDO = 0. Check datasheet section 5.1 for more details",
18+
"value": 1
19+
},
20+
"sleep-mode": {
21+
"help": "Default: Cold start = 1, Warm start = 0. Check SleepMode.txt",
22+
"value": 1
23+
},
24+
"standby-mode": {
25+
"help": "Default: STDBY_RC = 0, STDBY_XOSC = 1",
26+
"value": 0
27+
}
28+
}
29+
}

0 commit comments

Comments
 (0)