Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 6 commits into from
Mar 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion boards/canaryone.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"cpu": "cortex-m4",
"extra_flags": "-DARDUINO_NRF52840_CANARY -DNRF52840_XXAA",
"f_cpu": "64000000L",
"hwids": [["0x239A", "0x4405"]],
"hwids": [["0x239A", "0x4405"], ["0x239A", "0x009F"]],
"usb_product": "CanaryOne",
"mcu": "nrf52840",
"variant": "canaryone",
Expand Down
5 changes: 5 additions & 0 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -680,6 +680,11 @@ void setup()
digitalWrite(SX126X_ANT_SW, 1);
#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
if (settingsMap[use_sx1262]) {
if (!rIf) {
Expand Down
3 changes: 3 additions & 0 deletions variants/canaryone/variant.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@ static const uint8_t A0 = PIN_A0;
#define EXTERNAL_FLASH_DEVICES MX25R1635F
#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
*/
Expand Down
Loading