Commit graph

205 commits

Author SHA1 Message Date
Callan Bryant
c49323fa78
Prevent spurious resets on some boards
My receiver was failing to receive after a random amount of time (2 - 60
seconds). I discovered some power supply issues (DC-DC converter
related) that turned out to be another cause of the same problem but
only on some boards.

The reset procedure for most of the boards that RadioLib can drive
changes the pin mode of the reset line to an input after reset,
effectively tri-stating the output. I had seen this but dismissed it
after checking that the SX126x has a pullup on NRST meaning this was not
an issue.

The receiver I have produced uses a level converter to translate the 5v0
signals to 3v3. The level converters are not themselves pulled up or
down, which means when a pin is connected in a high-impedance input
state it will float around possibly randomly.

This can cause spurious resets on my board, and possibly others. I
remembered the reset procedure when I realised I could reproduce the
problem by rubbing the board on my shirt, probably causing some ESD to
trigger a change on the reset line.

This PR simply removes the lines that change the pinmode to input after
reset leaving it as an output which is hard-driven and the safest way. I
assume that the current behaviour was chosen to decrease the chance of a
conflict if used incorrectly.
2020-01-29 15:00:36 +00:00
Callan Bryant
81fe2d09f8
[SX126x] Parameter to use LDO in begin()
See 4231edee70
for context.
2020-01-28 14:13:20 +00:00
jgromes
ff97f3957b [SX126x] Added method to get currently configured OCP 2020-01-27 09:30:44 +01:00
jgromes
f336922013 [SX126x] Added missing OCP range check 2020-01-27 09:13:39 +01:00
jgromes
362dde44b0 [SX126x] Added SPI transaction delay for fast platforms 2020-01-26 18:55:04 +01:00
jgromes
4231edee70 [SX126x] Added missing call to setRegulator 2020-01-26 18:54:38 +01:00
jgromes
f316920bab [SX126x] Removed setOptimalHiPowerPaConfig 2020-01-26 15:19:08 +01:00
jgromes
2ef331ed9c [SX126x] Added public methods to set regulator mode 2020-01-26 15:11:41 +01:00
jgromes
e800a0584c [SX126x] Added missing assertion 2020-01-26 09:06:09 +01:00
jgromes
58640e2801 [SX126x] Added option to read data even after CRC error 2020-01-21 15:29:05 +01:00
jgromes
75335bdff3 [SX126x] Added missing default packet mode in FSK 2020-01-21 14:48:52 +01:00
jgromes
e890e4f474 [SX126x] Added missing calls to yield 2020-01-19 13:25:25 +01:00
jgromes
d892320637 [SX126x] Added option to set LoRa sync word control bits 2020-01-14 18:08:45 +01:00
jgromes
5728bf4124 [SX126x] Added assert macro 2020-01-13 16:37:21 +01:00
jgromes
bc31827505 Minor formatting fixes 2020-01-13 15:22:57 +01:00
Callan Bryant
17e3f47c2f
correct return types 2020-01-13 12:15:58 +00:00
Callan Bryant
e441e101ff
check modem type when header type set 2020-01-13 12:10:04 +00:00
Callan Bryant
3ac63e8c95
remove redundant call to setPacketParams 2020-01-13 09:55:35 +00:00
Callan Bryant
a4e087daf5
edit getTimeOnAir to support implicit mode 2020-01-10 14:31:21 +00:00
Callan Bryant
8d2c98339f
fix default args, scoping 2020-01-10 14:20:42 +00:00
Callan Bryant
07429986c2
set implicit params with extra SPI call where required 2020-01-10 14:11:28 +00:00
Callan Bryant
870a135b15
make sure _implicitLen is passed where appropriate 2020-01-10 11:54:28 +00:00
Callan Bryant
3bea627df4
switch to recoding implicit length for use JIT 2020-01-10 09:38:49 +00:00
Callan Bryant
51ce45220b
pass len as param to implicitHeader 2020-01-09 16:08:00 +00:00
Callan Bryant
b85e7474b3
specify _headerType with every call to setPacketParams 2020-01-09 15:16:52 +00:00
Callan Bryant
562ed02eab
add missing parameter to setHeaderType 2020-01-09 14:54:15 +00:00
Callan Bryant
28671fb01a
implement explicitHeader/implicitHeader 2020-01-09 14:53:18 +00:00
Callan Bryant
7ab5bf7328
setHeaderType 2020-01-09 14:45:40 +00:00
Callan Bryant
d0b817adb9
Implement explicit mode support 2020-01-09 14:22:38 +00:00
jgromes
e39c804c73 [SX126x] Fixed typo 2020-01-06 17:21:02 +01:00
jgromes
b657bc3521 [SX126x] Fixed reset delay duration 2020-01-03 15:07:54 +01:00
jgromes
25f9c73332 [SX126x] Improved reset procedure 2020-01-02 14:48:31 +01:00
jgromes
e745fe2988 [SX126x] Fixed narrowing conversion warning 2019-12-30 20:07:04 +01:00
jgromes
02ac97b07e [SX126x] Added option to change sleep mode (cold/warm start) 2019-12-29 12:21:14 +01:00
jgromes
460a050a63 [SX126x] Added methods to clear DIO actions 2019-12-29 10:37:04 +01:00
jgromes
fdb8993336 [SX126x] Added missing calls to standby 2019-12-27 16:48:58 +01:00
jgromes
55aff74a81 [SX126x] Changed pin mapping, added reset, changed LoRa sync word to 1B 2019-12-27 13:21:21 +01:00
jgromes
a1f94d9f16 [SX126x] Set DIO2 to RF switch by default 2019-12-27 09:25:38 +01:00
jgromes
735dd4f551 [SX126x] Fixed narrowing conversions 2019-12-05 18:16:27 +01:00
Jan Gromeš
104c656860
Merge pull request #84 from BarryPSmith/receiveDutyCycle
Added sx126x receive duty cycle interface
2019-12-05 15:57:14 +01:00
jgromes
7631353b4a Fixed incorrect variable name 2019-12-05 14:42:00 +01:00
jgromes
f543436647 Minor formatting changes 2019-12-05 14:38:44 +01:00
BarryPSmith
825fa90e7f Minor startReceiveDutyCycle changes, as requested. 2019-12-04 12:41:41 -08:00
jgromes
636484f405 Minor foramtting changes 2019-12-04 08:53:18 +01:00
BarryPSmith
a20f62da2f Added sx126x receive duty cycle interface 2019-12-03 22:43:10 -08:00
BarryPSmith
914524e7db Removed some SX126x floating point logic to save code space 2019-12-03 16:47:44 -08:00
Jan Gromeš
2a3172b755
Merge pull request #81 from BarryPSmith/sx126x_crc_checks
Enabled SX126x CRC check IRQs on receive
2019-12-01 07:59:19 +01:00
jgromes
4729b8518b Fixed setFrequencyRaw and setTCXO ignoring module status (#78) 2019-12-01 07:57:40 +01:00
BarryPSmith
de62610358 Enabled CRC check IRQs on receive 2019-11-30 22:16:01 -08:00
jgromes
b0dee4c51c [SX126x] Removed DIO2 from constructor 2019-11-27 08:50:21 +01:00