dtuGateway icon indicating copy to clipboard operation
dtuGateway copied to clipboard

ESP32 - S3 don´t boot

Open AmshaSharam opened this issue 7 months ago • 10 comments

i try flashing an ESP32-s3 with adicional usb port but afterflashing keeps booting , any help. Flashed with Flash Download tool. if i flash with opendtu firmware on the web flasher its works.

AmshaSharam avatar May 19 '25 00:05 AmshaSharam

Hi @AmshaSharam ,

I guess way to less information ... ;-) check the readme for first time flashing (especially for ESP32 use the right additional files) and go step by step with this instructions - and document here incl. maybe logfiles during flashing - to have some valuable info what can be discussed.

ohAnd avatar May 19 '25 07:05 ohAnd

after reading openDtu , looks like for ESP32 - S3 there are files for that chips, they also have xxxx.factory.bin for use in the first time , and it works on my esp. I got an ESP32-s3 Wroom-1 N16R8 After flashing like the post refered on instalation intrustions. the flash don,t give any errors, but the esp keep flashing , and on terminal i can´t connect because keeps booting.

AmshaSharam avatar May 19 '25 20:05 AmshaSharam

can you explain in detail which steps you are running through and which files (from where) you use to flash for the first time

ohAnd avatar May 20 '25 17:05 ohAnd

Can you bild please a version for the esp32- S3 ?

AmshaSharam avatar May 24 '25 17:05 AmshaSharam

ok, let's give it a try - see last snapshot But I have no chance to test - so it will be as it is.

ohAnd avatar May 25 '25 12:05 ohAnd

Thank you very much Unfortunately it didn't work. I've been reading about it, I think you have to provide me with the "bootloader.bin" files, etc., for this board, the settings for the Flash tool also change for this board, and i try it, i change the adress of the bootloader,bim to "0" and "0x00".

Image Image Image

board: esp32-s3-devkitc-1 - n16r8v

AmshaSharam avatar May 25 '25 17:05 AmshaSharam

oh forgot to mention - check https://github.com/ohAnd/dtuGateway/tree/develop/doc/esp32_S3_factoryFlash

ohAnd avatar May 25 '25 18:05 ohAnd

Now its working but its stays on this screen:

Image

i use usb port to flash

Image

my flash settings: 1º selected:

Image

2º:

Image

i reset and etc.

Try terminal serial port uart , usb don't show data getting this:

Image

it's on good way, many thanks

AmshaSharam avatar May 25 '25 20:05 AmshaSharam

Serial port report:

Booting - with firmware version 2.2.0080_develop

UserConfigManager::loadConfig - config loaded from json: /userconfig.json UserConfigManager::begin - Config loaded successfully UserConfigManager::loadConfig - config loaded from json: /userconfig.json


Configuration loaded from config file: '/userconfig.json' wifi ssid: mySSID wifi pass: myPassword

dtu update time: 31 host: 192.168.0.254 cloud pause enabled: 1 cloud pause time: 40

openhab host: 192.168.1.100 item prefix: inverter binding active: 0

mqtt host: 192.168.1.100 port: 1883 TLS: 0 user: dtuuser pass: dtupass topic: dtu_2761436 binding active: 0 HA autoDiscovery: 0

remoteDisplay: 0

remoteSummaryDisplay: 0

display connected type: 1 orientation: 0 brightness day: 100 brightness night: 10 night clock: 0 night mode: 0 night mode offline trigger: 0 nightmode start: 1320 nightmode end: 360 TFT seconds ring: 1

init (wifiAPstart): 1 update channel: 0 timezone offset: 7200

[ 435][E][esp32-hal-gpio.c:102] __pinMode(): Invalid pin selected Guru Meditation Error: Core 1 panic'ed (StoreProhibited). Exception was unhandled.

Core 1 register dump: PC : 0x42020f13 PS : 0x00060a30 A0 : 0x82020fec A1 : 0x3fcebc90
A2 : 0x00000010 A3 : 0x00000001 A4 : 0x60004000 A5 : 0x00000017
A6 : 0x000000ff A7 : 0x3fcee804 A8 : 0x08000000 A9 : 0x3fcebc60
A10 : 0x3fca1be0 A11 : 0x00000001 A12 : 0xffffffff A13 : 0x00000004
A14 : 0x00000000 A15 : 0x3fc98a30 SAR : 0x0000001e EXCCAUSE: 0x0000001d
EXCVADDR: 0x00000010 LBEG : 0x420bdadc LEND : 0x420bdb40 LCOUNT : 0x00000000

Backtrace: 0x42020f10:0x3fcebc90 0x42020fe9:0x3fcebcc0 0x4200d8fe:0x3fcebce0 0x4200f81d:0x3fcebd00 0x4203570e:0x3fcebd70

ELF file SHA256: 3adabc0216569bf7

Rebooting... �ESP-ROM:esp32s3-20210327 Build:Mar 27 2021 rst:0xc (RTC_SW_CPU_RST),boot:0x8 (SPI_FAST_FLASH_BOOT) Saved PC:0x420d7aba SPIWP:0xee mode:DIO, clock div:1 load:0x3fce3808,len:0x4bc load:0x403c9700,len:0xbd8 load:0x403cc700,len:0x2a0c entry 0x403c98d0

Booting - with firmware version 2.2.0080_develop

AmshaSharam avatar May 25 '25 20:05 AmshaSharam

;-) as said not supported - because not testable on my side ...

let's try further

your pre last post: Interesting that you get the website - do you could also configure your local wifi? -> additionally check here - seems similiar point https://github.com/ohAnd/dtuGateway/discussions/78#discussioncomment-13209313

last post:

[ 435][E][esp32-hal-gpio.c:102] __pinMode(): Invalid pin selected
Guru Meditation Error: Core 1 panic'ed (StoreProhibited). Exception was unhandled.

that's interesting ... when this happend? - after every startup or only every second startup - in the state that the dtuGateway is still in factory mode? (asked with intention)

I've checked shortly the needed IOs which are used in this project with the result the common ESP32 S3 should be compatible with the given setup...

So please check your board and schematic for uncompatbility to the given setup ... to find the cause why you getting here Invalid pin selected used GPIOs are => https://github.com/ohAnd/dtuGateway?tab=readme-ov-file#hardware and GPIO 2 for a LED (blinking info)

ohAnd avatar May 26 '25 19:05 ohAnd

@AmshaSharam is it now running ?

If yes, maybe you can describe for a short what was maybe the problem? Then I can take it over to the readme.

btw. do you also using a display (which one) and it also working and with which pinning?

ohAnd avatar Jun 07 '25 17:06 ohAnd

Sorry, i´m busy with work. I find that my board is ESP32-S3 with 16 MB Flash 8 MB PSRAM + usb, i try to compile with settings for this board , but didn´t work. If i use [opendtu-generic_esp32s3_usb.factory.bin] it works, im trying to find the right settings on platformio to work.

AmshaSharam avatar Jun 11 '25 19:06 AmshaSharam

hi Finally i got it, im now testing with ESP32-S3-WROOM-1-N16R8 connected to HMS-1000W-2T. how i do: On platformio.ini :

; Flash: 16MB QD, PSRAM: 8MB OT [env:esp32-s3-devkitc-1-n16r8] platform = espressif32 board = esp32-s3-devkitc-1-n16r8v framework = arduino

board_build.arduino.memory_type = qio_opi board_build.flash_mode = qio board_build.psram_type = opi board_upload.flash_size = 16MB board_upload.maximum_size = 16777216 board_build.partitions = default_16MB.csv board_build.extra_flags = -DBOARD_HAS_PSRAM

monitor_speed = 115200 monitor_port = COM4 upload_port = COM4 upload_speed = 921600 lib_deps = arduino-libraries/NTPClient @ ^3.2.1 robtillaart/CRC @ ^1.0.2 nanopb/Nanopb @ ^0.4.8 gyverlibs/UnixTime @ ^1.1 bblanchon/ArduinoJson @ ^7.0.0 knolleary/PubSubClient @ ^2.8 olikraus/U8g2 @ ^2.35.19 bodmer/TFT_eSPI @ ^2.5.43 ESP32Async/AsyncTCP @ 3.4.2 ESP32Async/ESPAsyncWebServer @ 3.7.7

custom_nanopb_protos = +<include/proto/AppGetHistPower.proto> +<include/proto/RealtimeDataNew.proto> +<include/proto/GetConfig.proto> +<include/proto/CommandPB.proto> +<include/proto/AlarmData.proto> extra_scripts = pre:version_inc.py monitor_filters = esp32_exception_decoder default time build_flags = -DUSER_SETUP_LOADED=1 -DGC9A01_DRIVER=1 -DTFT_WIDTH=240 -DTFT_HEIGHT=240 -DTFT_MISO=19 -DTFT_MOSI=23 -DTFT_SCLK=18 -DTFT_CS=15 -DTFT_DC=2 -DTFT_RST=-1 -DLOAD_GLCD=1 -DLOAD_FONT2=1 -DLOAD_FONT4=1 -DLOAD_FONT6=1 -DLOAD_FONT7=1 -DLOAD_FONT8=1 -DLOAD_GFXFF=1 -DSMOOTH_FONT=1 -DSPI_FREQUENCY=27000000

than flashed on COM port.

Now i will connect the screen to see its working

AmshaSharam avatar Jun 14 '25 17:06 AmshaSharam

Just change the title :)

Image

AmshaSharam avatar Jun 14 '25 18:06 AmshaSharam

ok, thanks looks good... I've tried to bring this as additonal to build and see that your defined board not exist in platform.io...

I've build this also with devkitc-1 but additionally to support 16MB and PSRAM with your mentioned build-flags.

Can you please test the dev build?

Then it will be part of the standard builds fur further changes...

Title thing have to be another issue - so it can be automized by recognition of the type of the inverter... (so you don't need your "own" build fur further updates .. ;-) )

ohAnd avatar Jun 29 '25 08:06 ohAnd

hi, i try flash your bin file, didnt work, i flashed by UART and USB, keeps booting, i use my bootloader.bin and etc, no lucky. Put this file on "platformio\platforms\espressif32\boards"

esp32-s3-devkitc-1-n16r8v.json

AmshaSharam avatar Jul 07 '25 20:07 AmshaSharam

thanks, I've translated this directly to the platform.ini (to have it more easier for the github actions workflow) - can you please check the last develop again?

ohAnd avatar Jul 07 '25 20:07 ohAnd