arendst / Tasmota

Alternative firmware for ESP8266 and ESP32 based devices with easy configuration using webUI, OTA updates, automation using timers or rules, expandability and entirely local control over MQTT, HTTP, Serial or KNX. Full documentation at
https://tasmota.github.io/docs
GNU General Public License v3.0
21.98k stars 4.77k forks source link

Display not working in Version 9.5.0.9, was working in Version 9.5.0.1 #13325

Closed helmar74 closed 2 years ago

helmar74 commented 2 years ago

PROBLEM DESCRIPTION

A clear and concise description of what the problem is.

REQUESTED INFORMATION

Make sure your have performed every step and checked the applicable boxes before submitting your issue. Thank you!

- [ ] If using rules, provide the output of this command: `Backlog Rule1; Rule2; Rule3`:
```lua
  Rules output here:
- [ ] Set `weblog` to 4 and then, when you experience your issue, provide the output of the Console log:
```lua
  Console output here:

TO REPRODUCE

Steps to reproduce the behavior: Compile Tasmota 9.5.0.1 with the following user_config_override.h: // Für ST 7786 Display (LilyGO TTGO)

undef USE_DISPLAY_ST7789

define USE_DISPLAY_ST7789

// Für RA 8876 SPI DISPLAY

undef USE_DISPLAY_RA8876

define USE_DISPLAY_RA8876

//*** // Aus https://github.com/arendst/Tasmota/issues/10392 // Schreibt Init-Meldung auf das Display

define SHOW_SPLASH

// Analoge Uhr anzeigen

define USE_AWATCH

define USE_UFILESYS

define USE_SDCARD

//Für Anzeige von JPEG Bildern

define JPEG_PICTS

// Wegen Compilefehler

undef USE_RULES

define USE_SCRIPT

// Dateien auch in der WEBGUI löschen

define GUI_TRASH_FILE

.... and platform_override.ini: ; Example PlatformIO Project Configuration Override File ; Changes done here override settings in platformio.ini ; ; *** ; * to activate rename this file to platformio_override.ini * ; *** ; ; Please visit documentation for the options and examples ; http://docs.platformio.org/en/stable/projectconf.html

[platformio] ; For best Gitpod performance remove the ";" in the next line. Needed Platformio files are cached and installed at first run ;core_dir = .platformio extra_configs = platformio_tasmota_cenv.ini

; Build/upload environment default_envs = ; Uncomment the line(s) below to select version(s) ; tasmota ; tasmota-debug ; tasmota-minimal ; tasmota-lite ; tasmota-knx ; tasmota-sensors ; tasmota-display ; tasmota-zbbridge ; tasmota-ir tasmota32 ; tasmota32-bluetooth ; tasmota32-webcam ; tasmota32-knx ; tasmota32-sensors ; tasmota32-display ; tasmota32-ir ; tasmota32-ircustom ; tasmota32solo1 ; tasmota32c3 ; tasmota32s2 ; tasmota32-odroidgo ; tasmota32-core2

[env] framework = ${common.framework} platform = ${common.platform} platform_packages = ${common.platform_packages} ; Build variant 1MB = 1MB firmware no filesystem (default) board = ${common.board} ; Build variant 2MB = 1MB firmware, 1MB filesystem (most Shelly devices) ;board = esp8266_2M1M ; Build variant 4MB = 1MB firmware, 1MB OTA, 2MB filesystem (WEMOS D1 Mini, NodeMCU, Sonoff POW) ;board = esp8266_4M2M ;board_build.f_cpu = 160000000L ;board_build.f_flash = 40000000L board_build.filesystem = ${common.board_build.filesystem} build_unflags = ${common.build_unflags} build_flags = ${common.build_flags} ; Optional Debug messages ; -DDEBUG_TASMOTA_CORE ; -DDEBUG_TASMOTA_DRIVER ; -DDEBUG_TASMOTA_SENSOR monitor_speed = ${common.monitor_speed} ; Serial port used for erasing/flashing the ESP82xx ;upload_port = ${common.upload_port} upload_port = COM5 upload_resetmethod = ${common.upload_resetmethod} extra_scripts = ${scripts_defaults.extra_scripts} ; pio-tools/obj-dump.py lib_ldf_mode = ${common.lib_ldf_mode} lib_compat_mode = ${common.lib_compat_mode} lib_ignore = Servo(esp8266) ESP8266AVRISP ESP8266LLMNR ESP8266NetBIOS ESP8266SSDP SP8266WiFiMesh Ethernet(esp8266) GDBStub TFT_Touch_Shield_V2 ESP8266HTTPUpdateServer ESP8266WiFiMesh EspSoftwareSerial SPISlave Hash ; Disable next if you want to use ArduinoOTA in Tasmota (default disabled) ArduinoOTA lib_extra_dirs = ${library.lib_extra_dirs}

[env:tasmota32_base] framework = ${common.framework} platform = ${core32.platform} platform_packages = ${core32.platform_packages} ; Build variant ESP32 4M Flash, Tasmota 1856k Code/OTA, 320k LITTLEFS (default) board = esp32_4M ; Build variant ESP32 8M Flash, Tasmota 2944k Code/OTA, 2112k LITTLEFS ;board = esp32_8M ; Build variant ESP32 16M Flash, Tasmota 2944k Code/OTA, 10M LITTLEFS ;board = esp32_16M ; CPU Frequenz auf 240 MHz einstellen: board_build.f_cpu = 240000000L ;board_build.f_flash = 40000000L monitor_speed = 115200 ; *** Serial port used for erasing/flashing the ESP32 ;upload_port = ${common.upload_port} upload_port = COM4 ;upload_speed = 115200 upload_resetmethod = ${common.upload_resetmethod} extra_scripts = ${common.extra_scripts} build_unflags = ${esp32_defaults.build_unflags} ; Aktivierung von PSRAM mit build Flag -DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue -lc-psram-workaround -lm-psram-workaround ; Bis Tasmota v 9.5.0 nur -DBOARD_HAS_PSRAM ; Ab Tasmota v 9.5.0.1 neue platformio_override.ini ; damit auch große Bilder angezeigt werden können ; WEitere Infos siehe ; https://github.com/arendst/Tasmota/issues/10392 ; https://github.com/arendst/Tasmota/issues/12390 build_flags = ${esp32_defaults.build_flags} -DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue -lc-psram-workaround -lm-psram-workaround lib_ldf_mode = ${common.lib_ldf_mode} lib_compat_mode = ${common.lib_compat_mode} lib_ignore = ESP32 Azure IoT Arduino ESP32 Async UDP ESP32 BLE Arduino ; SimpleBLE NetBIOS ESP32 Preferences BluetoothSerial ; Disable next if you want to use ArduinoOTA in Tasmota32 (default disabled) ArduinoOTA

lib_extra_dirs = ${library.lib_extra_dirs} ; ESP32 lib. ALWAYS needed for ESP32 !!! lib/libesp32 ; comment the following line if you dont use LVGL in a Tasmota32 build. Reduces compile time lib/libesp32_lvgl ; uncomment the following line if you use Bluetooth or Apple Homekit in a Tasmota32 build. Reduces compile time ; lib/libesp32_div ; uncomment the following line if you use Epaper driver epidy in your Tasmota32 build. Reduces compile time ; lib/libesp32_epdiy

[library] shared_libdeps_dir = lib ; Library disable / enable for variant Tasmota(32). Disable reduces compile time ; !!! Disabling needed libs will generate compile errors !!! ; The resulting firmware will NOT be different if you leave all libs enabled ; Disabling by putting a ";" in front of the lib name ; If you dont know what it is all about, do not change lib_extra_dirs = ; Only disabled for Tasmota minimal and Tasmota light. For all other variants needed! lib/lib_basic ; ** I2C devices. Most sensors. Disable only if you dont have ANY I2C device enabled lib/lib_i2c ; ** Displays. Disable if you dont have any Display activated lib/lib_display ; Bear SSL and base64. Disable if you dont have SSL or TLS activated lib/lib_ssl ; Audio needs a lot of time to compile. Mostly not used functions. Recommended to disable ; lib/lib_audio ; RF 433 stuff (not RF Bridge). Recommended to disable lib/lib_rf ; *** Mostly not used functions. Recommended to disable lib/lib_div

EXPECTED BEHAVIOUR

A clear and concise description of what you expected to happen. In Tastmota Version 9.5.0.1 the ST7789 Display is working fine. When I compile Version Pre 9.6.0 with the same user_config_override.h and platform_override.ini the display isn't working anymore.

Has anyone an idea what changed between the versions? (Maybe further defines are needed?) The Display isn't also working, when I try to compile Tasmota32 Display version in Pre 9.6.0

SCREENSHOTS

If applicable, add screenshots to help explain your problem.

ADDITIONAL CONTEXT

Add any other context about the problem here.

(Please, remember to close the issue when the problem has been addressed)

barbudor commented 2 years ago

Pre9.60 is an internal tag to prepare a new release. Do not use that Use either production release 9.5.0 or development branch (currently 9.5.0.9)

helmar74 commented 2 years ago

Pre9.60 is an internal tag to prepare a new release. Do not use that Use either production release 9.5.0 or development branch (currently 9.5.0.9)

Thank you for the information. Tried it with current development version 9.5.0.9. The issue still exists. It's working fine with version 9.5.0.1

helmar74 commented 2 years ago

Further infos: The Template Configuration in Version 9.5.0.9 looks the same as in working version 9.5.0.1: image

(Not quite sure, why some GPIOS are marked red) I also tried to compare defines in my_user_config.h between versions, nothing found yet, what could cause the issue....

sfromis commented 2 years ago

Red gpios are basically "do not use", unless you really know your way around the issues. Gpio16/17 are reserved for PSRAM support (even without PSRAM present), and I'm not sure how much this will block Tasmota display from working, but I'd certainly use other pins for a good test.

Jason2866 commented 2 years ago

Using Gpio 16/17 WILL prevent Displays from working. This is the major breaking change from release 9.5. to the actual development version. With the upcoming v9.6. PSRAM handling is much easier. For EP32 which do not need the PSRAM fix (only old revisions do need) PSRAM is automatically enabled when found.

helmar74 commented 2 years ago

strange, it was working in 9.5.0.1 and it is a "ready to use" device (Lilygo), so the GPIOS can't be changed....

arendst commented 2 years ago

@Jason2866 if so I will add it to the release notes (as it's not there yet as being breaking)

helmar74 commented 2 years ago

... and this will break this device: https://templates.blakadder.com/lilygo_T-Display.html

sfromis commented 2 years ago

It is not strange that your config worked on 9.5.0.1, as the PSRAM improvements are later. Of course, you have a problem if you cannot move the pin usage. For now, I'd suggest that you stay on release version 9.5 instead of newer versions.

s-hadinger commented 2 years ago

13335 should solve it.

helmar74 commented 2 years ago

13335 should solve it.

Hi, thank you. I'll try it once the change is merged.

regards

helmar

sfromis commented 2 years ago

In my testing, the change did make the pins work for another use case, failing before the improvement.

Merged 7 minutes ago :-)

helmar74 commented 2 years ago

Yeah, I can confirm, that the merge also fixed my issue. It's working like in version 9.5.0.1 now.

Thank you all!!

helmar74 commented 2 years ago

The merge is no longer mentioned in changelog. Has it been removed again?

s-hadinger commented 2 years ago

Yes. I had to remove temporarily because it creates a bootloop on esp32pico d4. It will be reintroduced with a test to impact only esp32 non-pico

helmar74 commented 2 years ago

Yes. I had to remove temporarily because it creates a bootloop on esp32pico d4. It will be reintroduced with a test to impact only esp32 non-pico

OK waiting for that and trying again then

helmar74 commented 2 years ago

Out of the Changelog I assume, that the fix is merged again?

s-hadinger commented 2 years ago

Yes it is now

helmar74 commented 2 years ago

Hi,

I compiled with current version and the following build_flags in platformio_override.h build_flags = ${esp32_defaults.build_flags} -DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue -lc-psram-workaround -lm-psram-workaround

IT is a RA8876 Display with ESP32 with PSRAM. It looked like this in version 9.5.0.1: image

Now it looks like the PSRAM isn't recognized anymore: image

The strange thing is, that "big" jpg's couldn't be shown on the display without PSRAM enabled. Now the "big" jpg's work, but PSRAM isn't shown in the "Information Page" of Tasmota

In status4 the PSRAM is shown (in my opinion): stat/esp32_1/STATUS4 = {"StatusMEM":{"ProgramSize":1342,"Free":1984,"Heap":118,"PsrMax":4095,"PsrFree":4069,"ProgramFlashSize":4096,"FlashSize":4096,"FlashFrequency":40,"FlashMode":3,"Features":["00000407","97AAC58F","000D2BA1","B7FFBFCF","05FABBC0","60360CC7","000840F2","202C0000","0000482D"],"Drivers":"1,2,3,4,5,8,9,10,11,13,14,17,24,26,29,34,38,50,52,59","Sensors":"1,2,3,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,26,28,31,34,35,37,39,40,41,42,43,45,51,52,55,56,58,59,64,66,67,74,85,92,127"}}

Maybe it's only a issue of the webinterface?

Jason2866 commented 2 years ago

Yes, it is only the WebInterface. Can you please set weblog 4 and post the output after a restart?

helmar74 commented 2 years ago

Yes, it is only the WebInterface. Can you please set weblog 4 and post the output after a restart?

Hi, sure.

Here we go: 0:00:05.951 NTP: Synch time... 00:00:06.058 RTC: UTC 2021-10-13T12:13:56, DST 2021-03-28T02:00:00, STD 2021-10-31T03:00:00 14:13:56.000 NTP: Synched 14:13:56.762 HTP: Hauptmenü 14:13:56.915 MQT: Verbindungsversuch... 14:13:57.028 MQT: verbunden 14:13:57.033 MQT: tele/esp32_1/LWT = Online (beibehalten) 14:13:57.040 MQT: cmnd/esp32_1/POWER = 14:13:57.042 MQT: abonniere cmnd/esp32_1/# 14:13:57.046 MQT: abonniere cmnd/tasmotas/# 14:13:57.049 MQT: abonniere cmnd/ESP32_1_fb/# 14:13:57.054 MQT: tele/esp32_1/INFO1 = {"Info1":{"Module":"ESP32-DevKit","Version":"9.5.0.9(tasmota)","FallbackTopic":"cmnd/ESP32_1_fb/","GroupTopic":"cmnd/tasmotas/"}} 14:13:57.066 MQT: tele/esp32_1/INFO2 = {"Info2":{"WebServerMode":"Admin","Hostname":"ESP32-1","IPAddress":"192.168.1.179"}} 14:13:57.078 MQT: tele/esp32_1/INFO3 = {"Info3":{"RestartReason":"Software reset CPU"}} 14:13:57.086 MQT: stat/esp32_1/RESULT = {"POWER":"ON"} 14:13:57.089 MQT: stat/esp32_1/POWER = ON 14:13:57.092 TFS: File 'autoexec.bat' not found 14:14:01.781 HTP: Konsole 14:14:01.864 SRC: Backlog

arendst commented 2 years ago

As a notice, the web code does work for a webcam with PSRAM:

image

with restart log:

00:00:00.002 HDW: ESP32-D0WDQ6 (PSRAM)
00:00:00.002 HDW: FoundPSRAM=1 CanUsePSRAM=1
00:00:00.022 UFS: FlashFS mounted with 48 kB free
00:00:00.053 CFG: Loaded from File, Count 551
00:00:00.067 QPC: Count 1
00:00:00.071 ROT: Mode 1
00:00:00.072 SRC: Restart
00:00:00.074 Project tasmota - Esp32Cam2 Version 10.0.0(webcam)-1_0_7_4(2021-10-13T14:30:53)
00:00:00.225 WIF: Checking connection...
00:00:00.225 WIF: Attempting connection...
00:00:01.273 WIF: Network (re)scan started...
00:00:01.274 WIF: Checking connection...
00:00:01.274 WIF: Attempting connection...
00:00:02.185 WIF: Checking connection...
00:00:02.185 WIF: Attempting connection...
00:00:03.185 WIF: Network 0, AP2, SSId indebuurt_IoT, Channel 11, BSSId 18:E8:29:CA:17:C1, RSSI -54, Encryption 1
00:00:03.186 WIF: Network 1, AP2, SSId indebuurt_IoT, Channel 1, BSSId 74:83:C2:2A:F1:AC, RSSI -87, Encryption 1
00:00:03.541 WIF: Connecting to AP2 indebuurt_IoT Channel 11 BSSId 18:E8:29:CA:17:C1 in mode 11n as esp32cam2...
00:00:03.542 WIF: Checking connection...
00:00:03.542 WIF: Attempting connection...
00:00:04.426 WIF: Checking connection...
00:00:04.426 WIF: Attempting connection...
00:00:05.426 WIF: Checking connection...
00:00:05.426 WIF: Attempting connection...
00:00:06.426 WIF: Checking connection...
00:00:06.426 WIF: Connected
00:00:06.681 HTP: Web server active on esp32cam2 with IP address 192.168.2.201
00:00:06.938 QPC: Reset
00:00:07.001 NTP: Synch time...
00:00:07.019 RTC: UTC 2021-10-13T12:45:58, DST 2021-03-28T02:00:00, STD 2021-10-31T03:00:00
14:45:58.000 NTP: Synched
14:45:58.652 MQT: Attempting connection...
14:45:58.675 MQT: Connected
14:45:58.681 MQT: tele/esp32cam2/LWT = Online (retained)
14:45:58.688 MQT: cmnd/esp32cam2/POWER = 
14:45:58.689 MQT: Subscribe to cmnd/esp32cam2/#
14:45:58.693 MQT: Subscribe to cmnd/tasmotas/#
14:45:58.698 MQT: Subscribe to cmnd/DVES_1453B0_fb/#
14:45:58.710 MQT: tele/esp32cam2/INFO1 = {"Info1":{"Module":"AITHINKER CAM No SPI","Version":"10.0.0(webcam)","FallbackTopic":"cmnd/DVES_1453B0_fb/","GroupTopic":"cmnd/tasmotas/"}}
14:45:58.721 MQT: tele/esp32cam2/INFO2 = {"Info2":{"WebServerMode":"Admin","Hostname":"esp32cam2","IPAddress":"192.168.2.201"}}
14:45:58.732 MQT: tele/esp32cam2/INFO3 = {"Info3":{"RestartReason":"Software reset CPU"}}
14:45:58.740 MQT: stat/esp32cam2/RESULT = {"POWER":"OFF"}
14:45:58.747 MQT: stat/esp32cam2/POWER = OFF
14:45:58.754 TFS: File 'autoexec.bat' not found
14:45:59.926 APP: Boot Count 161

@helmar74 I think your logs are incomplete. We need to see the very first entries where the PSRAM testing takes place (see above). So pls re-provide the complete weblog 4 log.

helmar74 commented 2 years ago

Hi, yes I also think, that the logs are incomplete. But it's truncated, as I send a lot of backlog commands after the module is online with a MQTT broker So I can't see more.... Sorry for that. but if I use status 4 also PSRAM is shown: stat/esp32_1/STATUS4 = {"StatusMEM":{"ProgramSize":1342,"Free":1984,"Heap":122,**"PsrMax":4095,"PsrFree":4069,**"ProgramFlashSize":4096,"FlashSize":4096,"FlashFrequency":40,"FlashMode":3,"Features":["00000407","97AAC58F","000D2BA1","B7FFBFCF","05FABBC0","60360CC7","000840F2","202C0000","0000482D"],"Drivers":"1,2,3,4,5,8,9,10,11,13,14,17,24,26,29,34,38,50,52,59","Sensors":"1,2,3,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,26,28,31,34,35,37,39,40,41,42,43,45,51,52,55,56,58,59,64,66,67,74,85,92,127"}}

Jason2866 commented 2 years ago

Just go in the web frontend console and enter the command restart 1

helmar74 commented 2 years ago

Just go in the web frontend console and enter the command restart 1

Ah ok. Now here we go ;-) `00:00:00.002 HDW: ESP32-D0WD (PSRAM disabled) 00:00:00.002 HDW: FoundPSRAM=1 CanUsePSRAM=0 00:00:00.003 HDW: PSRAM is disabled, requires specific compilation on this hardware (see doc) 00:00:00.022 UFS: FlashFS mounted with 48 kB free 00:00:00.056 CFG: Loaded from File, Anzahl 1838 00:00:00.062 QPC: Count 1 00:00:00.065 SPI: Hardware using GPIO18(CLK), GPIO23(MOSI) and GPIO19(MISO) 00:00:00.067 ROT: Mode 1 00:00:00.069 BRY: GC from 742 to 742 bytes (in 0 ms) 00:00:00.071 BRY: GC from 1525 to 1525 bytes (in 0 ms) 00:00:00.083 BRY: GC from 3070 to 2492 bytes (in 1 ms) 00:00:00.087 BRY: GC from 3359 to 2938 bytes (in 0 ms) 00:00:00.088 BRY: Berry initialized, RAM used=2938 00:00:00.099 BRY: no 'preinit.be' 00:00:01.093 DSP: RA8876 00:00:01.122 UFS: SDCard mounted with 31132144 kB free 00:00:01.124 SRC: Restart 00:00:01.126 Projekt sonoffStandard - ESP32-1 Infodisplay Esszimmer Version 9.5.0.9(tasmota)-1_0_7_4(2021.10.13 10:24:10) 00:00:01.127 UFILESYSTEM OK! 00:00:01.158 Script: nv=0, tv=0, vns=0, vmem=16, smem=8192 00:00:01.187 BRY: no 'autoexec.be' 00:00:01.461 WIF: Prüfe Verbindung... 00:00:01.462 WIF: Verbindungsversuch... 00:00:01.918 WIF: verbinden mit AP1 hs.net_EG Channel 6 BSSId CC:CE:1E:AB:0A:3F in Modus 11n als ESP32-1... 00:00:02.706 WIF: Prüfe Verbindung... 00:00:02.707 WIF: Verbindungsversuch... 00:00:03.706 WIF: Prüfe Verbindung... 00:00:03.707 WIF: Verbindungsversuch... 00:00:04.050 WIF: Prüfe Verbindung... 00:00:04.051 WIF: Verbindungsversuch... 00:00:05.707 WIF: Prüfe Verbindung... 00:00:05.708 WIF: verbunden 00:00:05.907 NTP: Synch time... 00:00:05.973 RTC: UTC 2021-10-13T13:17:12, DST 2021-03-28T02:00:00, STD 2021-10-31T03:00:00 15:17:12.000 NTP: Synched 15:17:12.014 HTP: Web-Server aktiv bei ESP32-1 mit IP-Adresse 192.168.1.179 15:17:13.954 MQT: Verbindungsversuch... 15:17:13.985 MQT: verbunden 15:17:13.990 MQT: tele/esp32_1/LWT = Online (beibehalten) 15:17:13.997 MQT: cmnd/esp32_1/POWER = 15:17:13.999 MQT: abonniere cmnd/esp32_1/# 15:17:14.002 MQT: abonniere cmnd/tasmotas/# 15:17:14.004 MQT: abonniere cmnd/ESP32_1_fb/# 15:17:14.009 MQT: tele/esp32_1/INFO1 = {"Info1":{"Module":"ESP32-DevKit","Version":"9.5.0.9(tasmota)","FallbackTopic":"cmnd/ESP32_1_fb/","GroupTopic":"cmnd/tasmotas/"}} 15:17:14.021 MQT: tele/esp32_1/INFO2 = {"Info2":{"WebServerMode":"Admin","Hostname":"ESP32-1","IPAddress":"192.168.1.179"}} 15:17:14.029 MQT: tele/esp32_1/INFO3 = {"Info3":{"RestartReason":"Software reset CPU"}} 15:17:14.040 MQT: stat/esp32_1/RESULT = {"POWER":"ON"} 15:17:14.043 MQT: stat/esp32_1/POWER = ON 15:17:14.049 TFS: File 'autoexec.bat' not found 15:17:14.255 SRC: Backlog

helmar74 commented 2 years ago

looks like PSRAM is disabled, but is shown in status 4. Are my settings in PlatformIO_override.ini correct?

I change build_flags that way: build_flags = ${esp32_defaults.build_flags} -DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue -lc-psram-workaround -lm-psram-workaround

arendst commented 2 years ago

From the code below:

/*
 * ESP32 v1 and v2 needs some special patches to use PSRAM.
 * Standard Tasmota 32 do not include those patches.
 * If using ESP32 v1, please add: `-mfix-esp32-psram-cache-issue -lc-psram-workaround -lm-psram-workaround`
 *
 * This function returns true if the chip supports PSRAM natively (v3) or if the
 * patches are present.
 */
bool CanUsePSRAM(void) {
  if (!FoundPSRAM()) return false;
#ifdef HAS_PSRAM_FIX
  return true;
#endif
#ifdef CONFIG_IDF_TARGET_ESP32
  esp_chip_info_t chip_info;
  esp_chip_info(&chip_info);
  if ((CHIP_ESP32 == chip_info.model) && (chip_info.revision < 3)) {
    return false;
  }
#if ESP_IDF_VERSION_MAJOR < 4
  uint32_t chip_ver = REG_GET_FIELD(EFUSE_BLK0_RDATA3_REG, EFUSE_RD_CHIP_VER_PKG);
  uint32_t pkg_version = chip_ver & 0x7;
  if ((CHIP_ESP32 == chip_info.model) && (pkg_version >= 6)) {
    return false;   // support for embedded PSRAM of ESP32-PICO-V3-02 requires esp-idf 4.4
  }
#endif // ESP_IDF_VERSION_MAJOR < 4

#endif // CONFIG_IDF_TARGET_ESP32
  return true;
}

I expect you have to add the flag -DHAS_PSRAM_FIX also to make it work.

helmar74 commented 2 years ago

From the code below:

/*
 * ESP32 v1 and v2 needs some special patches to use PSRAM.
 * Standard Tasmota 32 do not include those patches.
 * If using ESP32 v1, please add: `-mfix-esp32-psram-cache-issue -lc-psram-workaround -lm-psram-workaround`
 *
 * This function returns true if the chip supports PSRAM natively (v3) or if the
 * patches are present.
 */
bool CanUsePSRAM(void) {
  if (!FoundPSRAM()) return false;
#ifdef HAS_PSRAM_FIX
  return true;
#endif
#ifdef CONFIG_IDF_TARGET_ESP32
  esp_chip_info_t chip_info;
  esp_chip_info(&chip_info);
  if ((CHIP_ESP32 == chip_info.model) && (chip_info.revision < 3)) {
    return false;
  }
#if ESP_IDF_VERSION_MAJOR < 4
  uint32_t chip_ver = REG_GET_FIELD(EFUSE_BLK0_RDATA3_REG, EFUSE_RD_CHIP_VER_PKG);
  uint32_t pkg_version = chip_ver & 0x7;
  if ((CHIP_ESP32 == chip_info.model) && (pkg_version >= 6)) {
    return false;   // support for embedded PSRAM of ESP32-PICO-V3-02 requires esp-idf 4.4
  }
#endif // ESP_IDF_VERSION_MAJOR < 4

#endif // CONFIG_IDF_TARGET_ESP32
  return true;
}

I expect you have to add the flag -DHAS_PSRAM_FIX also to make it work.

Yeah, I added the build flag and now it's working as expected:

00:00:00.002 HDW: ESP32-D0WD (PSRAM) 00:00:00.002 HDW: FoundPSRAM=1 CanUsePSRAM=1 00:00:00.011 UFS: FlashFS mounted with 48 kB free 00:00:00.026 CFG: Loaded from File, Anzahl 1843 00:00:00.032 QPC: Count 1 00:00:00.036 SPI: Hardware using GPIO18(CLK), GPIO23(MOSI) and GPIO19(MISO) 00:00:00.037 ROT: Mode 1 00:00:00.039 BRY: GC from 742 to 742 bytes (in 1 ms) 00:00:00.041 BRY: GC from 1525 to 1525 bytes (in 0 ms) 00:00:00.051 BRY: GC from 3070 to 2492 bytes (in 1 ms) 00:00:00.055 BRY: GC from 3359 to 2938 bytes (in 1 ms) 00:00:00.056 BRY: Berry initialized, RAM used=2938 00:00:00.062 BRY: no 'preinit.be' 00:00:01.085 DSP: RA8876 00:00:01.112 UFS: SDCard mounted with 31132144 kB free 00:00:01.114 SRC: Restart 00:00:01.116 Projekt sonoffStandard - ESP32-1 Infodisplay Esszimmer Version 9.5.0.9(tasmota)-1_0_7_4(2021.10.13 15:44:32) 00:00:01.117 UFILESYSTEM OK! 00:00:01.149 Script: nv=0, tv=0, vns=0, vmem=16, smem=8192 00:00:01.178 BRY: no 'autoexec.be' 00:00:01.453 WIF: Prüfe Verbindung... 00:00:01.454 WIF: Verbindungsversuch... 00:00:01.906 WIF: verbinden mit AP1 hs.net_EG Channel 6 BSSId CC:CE:1E:AB:0A:3F in Modus 11n als ESP32-1... 00:00:02.688 WIF: Prüfe Verbindung... 00:00:02.689 WIF: Verbindungsversuch... 00:00:03.689 WIF: Prüfe Verbindung... 00:00:03.690 WIF: Verbindungsversuch... 00:00:04.044 WIF: Prüfe Verbindung... 00:00:04.045 WIF: Verbindungsversuch... 00:00:05.689 WIF: Prüfe Verbindung... 00:00:05.690 WIF: verbunden 00:00:05.947 HTP: Web-Server aktiv bei ESP32-1 mit IP-Adresse 192.168.1.179 00:00:05.948 NTP: Synch time... 00:00:06.035 RTC: UTC 2021-10-13T13:48:47, DST 2021-03-28T02:00:00, STD 2021-10-31T03:00:00 15:48:47.000 NTP: Synched 15:48:47.920 MQT: Verbindungsversuch... 15:48:47.957 MQT: verbunden 15:48:47.962 MQT: tele/esp32_1/LWT = Online (beibehalten) 15:48:48.003 MQT: cmnd/esp32_1/POWER = 15:48:48.005 MQT: abonniere cmnd/esp32_1/# 15:48:48.007 MQT: abonniere cmnd/tasmotas/# 15:48:48.008 MQT: abonniere cmnd/ESP32_1_fb/# 15:48:48.016 MQT: tele/esp32_1/INFO1 = {"Info1":{"Module":"ESP32-DevKit","Version":"9.5.0.9(tasmota)","FallbackTopic":"cmnd/ESP32_1_fb/","GroupTopic":"cmnd/tasmotas/"}} 15:48:48.026 MQT: tele/esp32_1/INFO2 = {"Info2":{"WebServerMode":"Admin","Hostname":"ESP32-1","IPAddress":"192.168.1.179"}} 15:48:48.036 MQT: tele/esp32_1/INFO3 = {"Info3":{"RestartReason":"Software reset CPU"}} 15:48:48.047 MQT: stat/esp32_1/RESULT = {"POWER":"ON"}

image