mirror of
https://github.com/btclock/btclock_v3.git
synced 2024-11-19 00:21:06 +01:00
S3 OSPIRAM specific code
This commit is contained in:
parent
1f937d94fe
commit
2882240d0c
@ -14,32 +14,32 @@ CONFIG_HEAP_CORRUPTION_DETECTION=CONFIG_HEAP_POISONING_LIGHT
|
||||
CONFIG_HEAP_POISONING_LIGHT=y
|
||||
|
||||
CONFIG_ESP32S3_SPIRAM_SUPPORT=y
|
||||
CONFIG_SPIRAM_TRY_ALLOCATE_WIFI_LWIP=y
|
||||
CONFIG_BOOTLOADER_LOG_LEVEL=0
|
||||
CONFIG_LOG_BOOTLOADER_LEVEL_NONE=y
|
||||
CONFIG_BOOTLOADER_LOG_LEVEL_NONE=y
|
||||
CONFIG_ESP32S3_SPIRAM_SUPPORT=y
|
||||
CONFIG_LOG_DEFAULT_LEVEL_NONE=y
|
||||
CONFIG_LOG_DEFAULT_LEVEL=0
|
||||
CONFIG_LOG_MAXIMUM_LEVEL=0
|
||||
CONFIG_LOG_BOOTLOADER_LEVEL_NONE=y
|
||||
CONFIG_LOG_BOOTLOADER_LEVEL=0
|
||||
CONFIG_CXX_EXCEPTIONS=y
|
||||
CONFIG_COMPILER_CXX_EXCEPTIONS=y
|
||||
CONFIG_SPIRAM_TRY_ALLOCATE_WIFI_LWIP=n
|
||||
#CONFIG_BOOTLOADER_LOG_LEVEL=0
|
||||
#CONFIG_LOG_BOOTLOADER_LEVEL_NONE=y
|
||||
#CONFIG_BOOTLOADER_LOG_LEVEL_NONE=y
|
||||
#CONFIG_ESP32S3_SPIRAM_SUPPORT=y
|
||||
#CONFIG_LOG_DEFAULT_LEVEL_NONE=y
|
||||
#CONFIG_LOG_DEFAULT_LEVEL=0
|
||||
#CONFIG_LOG_MAXIMUM_LEVEL=0
|
||||
#CONFIG_LOG_BOOTLOADER_LEVEL_NONE=y
|
||||
#CONFIG_LOG_BOOTLOADER_LEVEL=0
|
||||
#CONFIG_CXX_EXCEPTIONS=y
|
||||
#CONFIG_COMPILER_CXX_EXCEPTIONS=y
|
||||
#CONFIG_BOOTLOADER_WDT_ENABLE=n
|
||||
#CONFIG_TASK_WDT=n
|
||||
|
||||
#Required for BTClock
|
||||
#CONFIG_SPIRAM_MODE_OCT=y
|
||||
CONFIG_SPIRAM_MODE_OCT=y
|
||||
#CONFIG_SPIRAM_MODE_QUAD=n
|
||||
|
||||
# Save RAM
|
||||
CONFIG_LWIP_IPV4=y
|
||||
CONFIG_LWIP_IPV6=y
|
||||
CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM=6
|
||||
CONFIG_ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM=12
|
||||
CONFIG_ESP_WIFI_DYNAMIC_TX_BUFFER_NUM=12
|
||||
CONFIG_ESP32_WIFI_RX_BA_WIN=6
|
||||
#CONFIG_LWIP_IPV4=y
|
||||
#CONFIG_LWIP_IPV6=y
|
||||
#CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM=6
|
||||
#CONFIG_ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM=12
|
||||
#CONFIG_ESP_WIFI_DYNAMIC_TX_BUFFER_NUM=12
|
||||
#CONFIG_ESP32_WIFI_RX_BA_WIN=6
|
||||
|
||||
CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=3120
|
||||
CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ_240
|
||||
|
@ -11,6 +11,7 @@ std::vector<std::string> screenNameMap(SCREEN_COUNT);
|
||||
std::mutex mcpMutex;
|
||||
|
||||
void setup() {
|
||||
Serial.println("Echo test");
|
||||
setupPreferences();
|
||||
setupHardware();
|
||||
setupDisplays();
|
||||
@ -28,12 +29,15 @@ void setup() {
|
||||
}
|
||||
}
|
||||
|
||||
tryImprovSetup();
|
||||
|
||||
setupWebserver();
|
||||
// tryImprovSetup();
|
||||
|
||||
// setupWebserver();
|
||||
uint32_t brown_reg_temp = READ_PERI_REG(RTC_CNTL_BROWN_OUT_REG); //save WatchDog register
|
||||
WRITE_PERI_REG(RTC_CNTL_BROWN_OUT_REG, 0); //disable brownout detector
|
||||
WiFi.begin();
|
||||
WiFi.setTxPower(WIFI_POWER_11dBm);
|
||||
// setupWifi();
|
||||
setupTime();
|
||||
//setupTime();
|
||||
finishSetup();
|
||||
|
||||
setupTasks();
|
||||
@ -50,6 +54,9 @@ void setup() {
|
||||
}
|
||||
|
||||
void tryImprovSetup() {
|
||||
uint32_t brown_reg_temp = READ_PERI_REG(RTC_CNTL_BROWN_OUT_REG); //save WatchDog register
|
||||
WRITE_PERI_REG(RTC_CNTL_BROWN_OUT_REG, 0); //disable brownout detector
|
||||
|
||||
WiFi.onEvent(WiFiEvent);
|
||||
|
||||
if (!preferences.getBool("wifiConfigured", false)) {
|
||||
@ -237,7 +244,7 @@ void setupMcp() {
|
||||
const int mcp1AddrValues[] = {LOW, LOW, LOW};
|
||||
|
||||
const int mcp2AddrPins[] = {MCP2_A0_PIN, MCP2_A1_PIN, MCP2_A2_PIN};
|
||||
const int mcp2AddrValues[] = {LOW, LOW, HIGH};
|
||||
const int mcp2AddrValues[] = {HIGH, LOW, LOW};
|
||||
|
||||
pinMode(MCP_RESET_PIN, OUTPUT);
|
||||
digitalWrite(MCP_RESET_PIN, HIGH);
|
||||
@ -277,7 +284,7 @@ void setupHardware() {
|
||||
Wire.begin(I2C_SDA_PIN, I2C_SCK_PIN, 400000);
|
||||
|
||||
if (!mcp1.begin_I2C(0x20)) {
|
||||
Serial.println(F("Error MCP23017"));
|
||||
Serial.println(F("Error MCP23017 1"));
|
||||
|
||||
// while (1)
|
||||
// ;
|
||||
@ -298,7 +305,7 @@ void setupHardware() {
|
||||
|
||||
#ifdef IS_BTCLOCK_S3
|
||||
if (!mcp2.begin_I2C(0x21)) {
|
||||
Serial.println(F("Error MCP23017"));
|
||||
Serial.println(F("Error MCP23017 2"));
|
||||
|
||||
// while (1)
|
||||
// ;
|
||||
|
@ -6,6 +6,8 @@
|
||||
#include <WiFiManager.h>
|
||||
#include <base64.h>
|
||||
#include <esp_task_wdt.h>
|
||||
#include "soc/soc.h"
|
||||
#include "soc/rtc_cntl_reg.h"
|
||||
|
||||
#include <map>
|
||||
|
||||
|
@ -123,11 +123,11 @@ void setupDisplays() {
|
||||
int *taskParam = new int;
|
||||
*taskParam = i;
|
||||
|
||||
xTaskCreate(updateDisplay, ("EpdUpd" + String(i)).c_str(), 2048, taskParam,
|
||||
xTaskCreate(updateDisplay, ("EpdUpd" + String(i)).c_str(), 8192, taskParam,
|
||||
11, &tasks[i]); // create task
|
||||
}
|
||||
|
||||
epdContent = {"B", "T", "C", "L", "O", "C", "K"};
|
||||
epdContent = {"B", "T", "C", "L", "O", "C", "K", "V2"};
|
||||
|
||||
setEpdContent(epdContent);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user