From 73e42aca9c4272b283ff6f2b5dbf733b9aca7fe9 Mon Sep 17 00:00:00 2001 From: Sandeep Mistry Date: Sun, 23 Apr 2017 20:38:04 -0400 Subject: [PATCH] Lower default SPI frequency to 8 MHz (from 10 MHz) --- API.md | 4 ++-- src/LoRa.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/API.md b/API.md index a2becbf..54d6dfc 100644 --- a/API.md +++ b/API.md @@ -39,9 +39,9 @@ Override the default SPI frequency of 10 MHz used by the library. **Must** be ca ```arduino LoRa.setSPIFrequency(frequency); ``` - * `frequency` - new SPI frequency to use, defaults to `10E6` + * `frequency` - new SPI frequency to use, defaults to `8E6` -This call is optional and only needs to be used if you need to change the default SPI frequency used. Some logic level converters cannot support high speeds such as 10 MHz, so a lower SPI frequency can be selected with `LoRa.setSPIFrequency(frequency)`. +This call is optional and only needs to be used if you need to change the default SPI frequency used. Some logic level converters cannot support high speeds such as 8 MHz, so a lower SPI frequency can be selected with `LoRa.setSPIFrequency(frequency)`. ### End diff --git a/src/LoRa.cpp b/src/LoRa.cpp index 92300f5..6d41414 100644 --- a/src/LoRa.cpp +++ b/src/LoRa.cpp @@ -48,7 +48,7 @@ #define MAX_PKT_LENGTH 255 LoRaClass::LoRaClass() : - _spiSettings(10E6, MSBFIRST, SPI_MODE0), + _spiSettings(8E6, MSBFIRST, SPI_MODE0), _ss(LORA_DEFAULT_SS_PIN), _reset(LORA_DEFAULT_RESET_PIN), _dio0(LORA_DEFAULT_DIO0_PIN), _frequency(0), _packetIndex(0),