tbnobody / OpenDTU

Software for ESP32 to talk to Hoymiles/TSUN/Solenso Inverters
GNU General Public License v2.0
1.83k stars 510 forks source link

Issue with installation on WT32-ETH01-EVO (V10-230410) #2364

Closed raptorecki closed 1 month ago

raptorecki commented 1 month ago

What happened?

Dear OpenDTU community,

I was trying to compile and install OpenDTU on some ethernet enabled board that I had laying around. Exactly: WT32-ETH01-EVO (V10-230410) with WT32C3-S5 on board. Basically this thing: https://github.com/AI6YP/eth01-evo

So when I approached it as just a generic esp32c3 board (I'd love to have ethernet enabled later, but at this point I can't even get it to boot without) it ended up with "invalid pin" crash:

00:26:57.004 > Build:Feb  7 2021
00:26:57.027 > rst:0xf (BROWNOUT_RST),boot:0xd (SPI_FAST_FLASH_BOOT)
00:26:57.027 > SPIWP:0xee
00:26:57.027 > mode:DIO, clock div:1
00:26:57.027 > load:0x3fcd5810,len:0x438
00:26:57.027 > load:0x403cc710,len:0x90c
00:26:57.027 > load:0x403ce710,len:0x2624
00:26:57.027 > entry 0x403cc710
00:26:57.274 > E (288) esp_core_dump_flash: No core dump partitio��
00:26:57.274 > Starting OpenDTU
00:26:57.274 > Initialize FS... done
00:26:57.274 > Reading configuration... done
00:26:57.382 > Reading PinMapping... [   393][E][vfs_api.cpp:105] open(): /littlefs/pin_mapping.json does not exist, no permits for creation
00:26:57.382 > using default config done
00:26:57.382 > Initialize Network... done
00:26:57.470 > Setting Hostname... Initialize NTP... done
00:26:57.470 > Initialize SunPosition... done
00:26:57.470 > Initialize MqTT... done
00:26:57.470 > Initialize WebApi... done
00:26:57.470 > Initialize Display... done
00:26:57.470 > Initialize LEDs... done
00:26:57.470 > Check for default DTU serial... done
00:26:57.470 > Initialize Hoymiles interface... Invalid pin config

And then goes into a boot loop. When I tried to to define pins manually like so:

board = esp32-c3-devkitc-02
custom_patches = ${env.custom_patches}
build_flags = ${env.build_flags}
    -DHOYMILES_PIN_MISO=1
    -DHOYMILES_PIN_MOSI=4
    -DHOYMILES_PIN_SCLK=5
    -DHOYMILES_PIN_IRQ=2
    -DHOYMILES_PIN_CE=18
    -DHOYMILES_PIN_CS=19

It did help but still no luck with completing a boot process.

00:47:22.928 > Build:Feb  7 2021
00:47:22.964 > rst:0xf (BROWNOUT_RST),boot:0xd (SPI_FAST_FLASH_BOOT)
00:47:22.964 > SPIWP:0xee
00:47:22.964 > mode:DIO, clock div:1
00:47:22.964 > load:0x3fcd5810,len:0x438
00:47:22.964 > load:0x403cc710,len:0x90c
00:47:22.964 > load:0x403ce710,len:0x2624
00:47:22.964 > entry 0x403cc710
00:47:23.198 > E (288) esp_core_dump_flash: No core dump partition�
00:47:23.198 > Starting OpenDTU
00:47:23.198 > Initialize FS... done
00:47:23.198 > Reading configuration... done
00:47:23.306 > Reading PinMapping... [   393][E][vfs_api.cpp:105] open(): /littlefs/pin_mapping.json does not exist, no permits for creation
00:47:23.306 > using default config done
00:47:23.306 > Initialize Network... done
00:47:23.411 > Setting Hostname... Initialize NTP... done
00:47:23.411 > Initialize SunPosition... done
00:47:23.411 > Initialize MqTT... done
00:47:23.411 > Initialize WebApi... done
00:47:23.411 > Initialize Display... done
00:47:23.411 > Initialize LEDs... done
00:47:23.411 > Check for default DTU serial... done
00:47:23.411 > Initialize Hoymiles interface... NRF: Connection error!!
00:47:23.427 >   Setting radio PA level...
00:47:23.427 >   Setting DTU serial...
00:47:23.427 >   Setting poll interval...
00:47:23.427 > done
00:47:23.427 > Switch to WiFi mode
00:47:23.430 > Setting Hostname... done

And boot loop again. Did anyone have any luck with this board? Is it a bug that it doesn't work as esp32c3, or it's just not supported for some reason? Unfortunately the documentation is not very clear on this, and different versions of WT32-ETH01 available do not make things any easier to investigate.

And yeah... wt32-eth01 config in platformio seems to be specific for esp32 and this board is esp32c3.

Any input on this much appreciated.

Cheers

To Reproduce Bug

Grab WT32-ETH01-EVO (V10-230410) board with WT32C3-S5.

Git clone the repo.

Compile as generic_esp32c3 with or without additional pin setup.

Upload.

Expected Behavior

Complete bootup.

Install Method

Self-Compiled

What git-hash/version of OpenDTU?

dc5eb96f5035ba9e058e38d83df2d6c691b0764b

What firmware variant (PIO Environment) are you using?

generic_esp32c3

Relevant log/trace output

00:47:22.901 > ESP-ROM:esp32c3-api1-20210207
00:47:22.928 > Build:Feb  7 2021
00:47:22.964 > rst:0xf (BROWNOUT_RST),boot:0xd (SPI_FAST_FLASH_BOOT)
00:47:22.964 > SPIWP:0xee
00:47:22.964 > mode:DIO, clock div:1
00:47:22.964 > load:0x3fcd5810,len:0x438
00:47:22.964 > load:0x403cc710,len:0x90c
00:47:22.964 > load:0x403ce710,len:0x2624
00:47:22.964 > entry 0x403cc710
00:47:23.198 > E (288) esp_core_dump_flash: No core dump partition�
00:47:23.198 > Starting OpenDTU
00:47:23.198 > Initialize FS... done
00:47:23.198 > Reading configuration... done
00:47:23.306 > Reading PinMapping... [   393][E][vfs_api.cpp:105] open(): /littlefs/pin_mapping.json does not exist, no permits for creation
00:47:23.306 > using default config done
00:47:23.306 > Initialize Network... done
00:47:23.411 > Setting Hostname... Initialize NTP... done
00:47:23.411 > Initialize SunPosition... done
00:47:23.411 > Initialize MqTT... done
00:47:23.411 > Initialize WebApi... done
00:47:23.411 > Initialize Display... done
00:47:23.411 > Initialize LEDs... done
00:47:23.411 > Check for default DTU serial... done
00:47:23.411 > Initialize Hoymiles interface... NRF: Connection error!!
00:47:23.427 >   Setting radio PA level...
00:47:23.427 >   Setting DTU serial...
00:47:23.427 >   Setting poll interval...
00:47:23.427 > done
00:47:23.427 > Switch to WiFi mode
00:47:23.430 > Setting Hostname... done

*boot loop*

Anything else?

No response

Please confirm the following

tbnobody commented 1 month ago

First of all, due to the fact that this is not a software issue right now but a question I would move this to the discussion section.

00:47:22.964 > rst:0xf (BROWNOUT_RST),boot:0xd (SPI_FAST_FLASH_BOOT) means that your power supply is too poor to sufficiently power the ESP. It resets due to low power.

You should not use the compile flags but device profiles to specify the pin assignments.