-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Add LDO startup delay before GC1109 chip enable #9573
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -6,6 +6,9 @@ | |||||||||||||||||||||||
| #ifdef ARCH_PORTDUINO | ||||||||||||||||||||||||
| #include "PortduinoGlue.h" | ||||||||||||||||||||||||
| #endif | ||||||||||||||||||||||||
| #if defined(USE_GC1109_PA) && defined(ARCH_ESP32) | ||||||||||||||||||||||||
| #include "esp_sleep.h" | ||||||||||||||||||||||||
| #endif | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| #include "Throttle.h" | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
|
|
@@ -60,6 +63,14 @@ template <typename T> bool SX126xInterface<T>::init() | |||||||||||||||||||||||
| pinMode(LORA_PA_POWER, OUTPUT); | ||||||||||||||||||||||||
| digitalWrite(LORA_PA_POWER, HIGH); | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| // TLV75733P LDO has ~550us startup time (datasheet tSTR). On cold boot, wait | ||||||||||||||||||||||||
| // for VBAT to stabilise before driving CSD/CPS, per GC1109 requirement: | ||||||||||||||||||||||||
| // "VBAT must be prior to CSD/CPS/CTX for the power on sequence" | ||||||||||||||||||||||||
| // On deep sleep wake the LDO was held on via RTC latch, so no delay needed. | ||||||||||||||||||||||||
| if (esp_sleep_get_wakeup_cause() == ESP_SLEEP_WAKEUP_UNDEFINED) { | ||||||||||||||||||||||||
| delayMicroseconds(1000); | ||||||||||||||||||||||||
| } | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
|
Comment on lines
+66
to
+73
|
||||||||||||||||||||||||
| // TLV75733P LDO has ~550us startup time (datasheet tSTR). On cold boot, wait | |
| // for VBAT to stabilise before driving CSD/CPS, per GC1109 requirement: | |
| // "VBAT must be prior to CSD/CPS/CTX for the power on sequence" | |
| // On deep sleep wake the LDO was held on via RTC latch, so no delay needed. | |
| if (esp_sleep_get_wakeup_cause() == ESP_SLEEP_WAKEUP_UNDEFINED) { | |
| delayMicroseconds(1000); | |
| } | |
| // TLV75733P LDO has ~550us startup time (datasheet tSTR). Wait for VBAT to | |
| // stabilise before driving CSD/CPS, per GC1109 requirement: | |
| // "VBAT must be prior to CSD/CPS/CTX for the power on sequence" | |
| delayMicroseconds(1000); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #9572, I might just combine these two changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code calls esp_sleep_get_wakeup_cause() inside a USE_GC1109_PA-only block, but the header include is guarded by USE_GC1109_PA && ARCH_ESP32. To avoid a compile break if USE_GC1109_PA is ever enabled on a non-ESP32 target, guard the esp_sleep_get_wakeup_cause() usage with ARCH_ESP32 as well (or avoid the ESP32-specific API entirely).