Add delay so GPS and Radio have time to power up (#3334)

* Add delay so GPS and Radio have time to power up

* reduce the delay a bit

* make delay more generic / configurable

* remove whitespace changes
This commit is contained in:
Steven Osborn 2024-03-07 05:11:25 -08:00 committed by GitHub
parent 2dd751e339
commit c860493e68
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 9 additions and 1 deletions

View File

@ -7,7 +7,7 @@
"cpu": "cortex-m4", "cpu": "cortex-m4",
"extra_flags": "-DARDUINO_NRF52840_CANARY -DNRF52840_XXAA", "extra_flags": "-DARDUINO_NRF52840_CANARY -DNRF52840_XXAA",
"f_cpu": "64000000L", "f_cpu": "64000000L",
"hwids": [["0x239A", "0x4405"]], "hwids": [["0x239A", "0x4405"], ["0x239A", "0x009F"]],
"usb_product": "CanaryOne", "usb_product": "CanaryOne",
"mcu": "nrf52840", "mcu": "nrf52840",
"variant": "canaryone", "variant": "canaryone",

View File

@ -680,6 +680,11 @@ void setup()
digitalWrite(SX126X_ANT_SW, 1); digitalWrite(SX126X_ANT_SW, 1);
#endif #endif
#ifdef PIN_PWR_DELAY_MS
// This may be required to give the peripherals time to power up.
delay(PIN_PWR_DELAY_MS);
#endif
#ifdef ARCH_PORTDUINO #ifdef ARCH_PORTDUINO
if (settingsMap[use_sx1262]) { if (settingsMap[use_sx1262]) {
if (!rIf) { if (!rIf) {

View File

@ -103,6 +103,9 @@ static const uint8_t A0 = PIN_A0;
#define EXTERNAL_FLASH_DEVICES MX25R1635F #define EXTERNAL_FLASH_DEVICES MX25R1635F
#define EXTERNAL_FLASH_USE_QSPI #define EXTERNAL_FLASH_USE_QSPI
// Add a delay on startup to allow LoRa and GPS to power up
#define PIN_PWR_DELAY_MS 100
/* /*
* Lora radio * Lora radio
*/ */