kopia lustrzana https://github.com/meshtastic/firmware
[T-Deck] Fixed the issue that some devices may experience low voltage reset due to excessive startup current (#5607)
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>pull/5610/head
rodzic
8c6eec52f2
commit
63091b7838
19
src/main.cpp
19
src/main.cpp
|
@ -237,6 +237,17 @@ void printInfo()
|
||||||
#ifndef PIO_UNIT_TESTING
|
#ifndef PIO_UNIT_TESTING
|
||||||
void setup()
|
void setup()
|
||||||
{
|
{
|
||||||
|
#if defined(T_DECK)
|
||||||
|
// GPIO10 manages all peripheral power supplies
|
||||||
|
// Turn on peripheral power immediately after MUC starts.
|
||||||
|
// If some boards are turned on late, ESP32 will reset due to low voltage.
|
||||||
|
// ESP32-C3(Keyboard) , MAX98357A(Audio Power Amplifier) ,
|
||||||
|
// TF Card , Display backlight(AW9364DNR) , AN48841B(Trackball) , ES7210(Decoder)
|
||||||
|
pinMode(KB_POWERON, OUTPUT);
|
||||||
|
digitalWrite(KB_POWERON, HIGH);
|
||||||
|
delay(100);
|
||||||
|
#endif
|
||||||
|
|
||||||
concurrency::hasBeenSetup = true;
|
concurrency::hasBeenSetup = true;
|
||||||
#if ARCH_PORTDUINO
|
#if ARCH_PORTDUINO
|
||||||
SPISettings spiSettings(settingsMap[spiSpeed], MSBFIRST, SPI_MODE0);
|
SPISettings spiSettings(settingsMap[spiSpeed], MSBFIRST, SPI_MODE0);
|
||||||
|
@ -409,14 +420,6 @@ void setup()
|
||||||
digitalWrite(AQ_SET_PIN, HIGH);
|
digitalWrite(AQ_SET_PIN, HIGH);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(T_DECK)
|
|
||||||
// enable keyboard
|
|
||||||
pinMode(KB_POWERON, OUTPUT);
|
|
||||||
digitalWrite(KB_POWERON, HIGH);
|
|
||||||
// There needs to be a delay after power on, give LILYGO-KEYBOARD some startup time
|
|
||||||
// otherwise keyboard and touch screen will not work
|
|
||||||
delay(200);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Currently only the tbeam has a PMU
|
// Currently only the tbeam has a PMU
|
||||||
// PMU initialization needs to be placed before i2c scanning
|
// PMU initialization needs to be placed before i2c scanning
|
||||||
|
|
Ładowanie…
Reference in New Issue