diff --git a/boards/nrf52840_dk_modified.json b/boards/nrf52840_dk_modified.json index a11ea02c5..cbd246480 100644 --- a/boards/nrf52840_dk_modified.json +++ b/boards/nrf52840_dk_modified.json @@ -1,7 +1,7 @@ { "build": { "arduino": { - "ldscript": "nrf52840_s140_v6.ld" + "ldscript": "nrf52840_s113_v7.ld" }, "core": "nRF5", "cpu": "cortex-m4", @@ -16,9 +16,9 @@ "name": "adafruit" }, "softdevice": { - "sd_flags": "-DS140", - "sd_name": "s140", - "sd_version": "6.1.1", + "sd_flags": "-DS113", + "sd_name": "s113", + "sd_version": "7.2.0", "sd_fwid": "0x00B6" }, "bootloader": { diff --git a/src/mesh/SX1262Interface.cpp b/src/mesh/SX1262Interface.cpp index d94951470..0a23261b5 100644 --- a/src/mesh/SX1262Interface.cpp +++ b/src/mesh/SX1262Interface.cpp @@ -201,16 +201,17 @@ bool SX1262Interface::isActivelyReceiving() bool SX1262Interface::sleep() { - DEBUG_MSG("sx1262 entering sleep mode\n"); + // Not keeping config is busted - next time nrf52 board boots lora sending fails tcxo related? - see datasheet + DEBUG_MSG("sx1262 entering sleep mode (FIXME, don't keep config)\n"); setStandby(); // Stop any pending operations // turn off TCXO if it was powered // FIXME - this isn't correct // lora.setTCXO(0); - // put chipset into sleep mode - disableInterrupt(); - lora.sleep(false); // Note: we do not keep the config, full reinit will be needed + // put chipset into sleep mode (we've already disabled interrupts by now) + bool keepConfig = true; + lora.sleep(keepConfig); // Note: we do not keep the config, full reinit will be needed #ifdef SX1262_POWER_EN digitalWrite(SX1262_POWER_EN, LOW); diff --git a/variants/eink/variant.h b/variants/eink/variant.h index a37c50aba..5ce975fb5 100644 --- a/variants/eink/variant.h +++ b/variants/eink/variant.h @@ -205,6 +205,7 @@ External serial flash WP25R1635FZUIL0 #define PIN_EINK_MOSI (0 + 29) // also called SDI // Controls power for the eink display - Board power is enabled either by VBUS from USB or the CPU asserting PWR_ON +// FIXME - I think this is actually just the board power enable - it enables power to the CPU also #define PIN_EINK_PWR_ON (0 + 12) #define HAS_EINK @@ -242,7 +243,7 @@ External serial flash WP25R1635FZUIL0 #define PIN_SPI_SCK (0 + 19) // To debug via the segger JLINK console rather than the CDC-ACM serial device -// #define USE_SEGGER +#define USE_SEGGER #ifdef __cplusplus }