Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ESP32C3] Allow GPIO 11, 12, 13 to be used on specific boards #5175

Open
wants to merge 4 commits into
base: mega
Choose a base branch
from

Conversation

TD-er
Copy link
Member

@TD-er TD-er commented Dec 10, 2024

As discussed on the forum

@Alex-Orts
Copy link

Doesn't work after filling ESP_Easy_mega_20241210_neopixel_ESP32c3_4M316k_LittleFS_CDC_ETH

@TD-er
Copy link
Member Author

TD-er commented Dec 10, 2024

Just to be sure, you did use the one from the GH Actions build of this PR?
And not the one uploaded to the web flasher?

@Alex-Orts
Copy link

@TD-er
Copy link
Member Author

TD-er commented Dec 10, 2024

GPIO-11 is selectable?

@Alex-Orts
Copy link

Alex-Orts commented Dec 10, 2024

ESP-ROM:esp32c3-api1-20210207
Build:Feb 7 2021
rst:0x8 (TG1WDT_SYS_RST),boot:0xc (SPI_FAST_FLASH_BOOT)
Saved PC:0x40380138
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fcd5820,len:0x98
load:0x403cc710,len:0x86c
load:0x403ce710,len:0x2138
entry 0x403cc710
00.165 : (264960) Info :

INIT : Booting version: ESP_Easy_mega_20241210_neopixel_ESP32c3_4M316k_LittleFS_ CDC_ETH, (GitHub Actions) HEAD_4677a9e (ESP32 SDK 5.3.1.241024)
00.166 : (264816) Info : INIT : Free RAM:264816
00.178 : (264640) Info : INIT : External Watchdog #3 Last Action before Reboot : Background Task Last systime: 0 - Restart Reason: CPU0: Timer Group1 Watch dog reset digital core
00.190 : (264624) Info : FS : Mounting...
00.217 : (262640) Info : FS : LittleFS mount successful, used 151552 bytes o f 323584

Build changed!

And so on in a circle

@TD-er
Copy link
Member Author

TD-er commented Dec 10, 2024

But does GPIO-11 show up in the GPIO selection combobox?

@Alex-Orts
Copy link

The device does not boot.

@Alex-Orts
Copy link

Flashed from ESP_Easy_mega_20241210_neopixel_ESP32c3_4M316k_LittleFS_CDC_ETH.factory It doesn't work

@TD-er
Copy link
Member Author

TD-er commented Dec 10, 2024

Hmm did you have LittleFS build installed before, so it is not just a wrong file system issue?

Flashed from ESP_Easy_mega_20241210_neopixel_ESP32c3_4M316k_LittleFS_CDC_ETH.factory It doesn't work

That 'factory' is for flashing via serial.

Can you switch back to before this change using the build on the webflasher page?

https://td-er.nl/ESPEasy/latest/

@TD-er
Copy link
Member Author

TD-er commented Dec 10, 2024

The build now building is now using a later ESP-IDF5.3 SDK and latest Arduino3.x code for LittleFS builds.
So maybe you can also test that one as it has some fixes regarding releasing allocated resources to a GPIO pin.

@Alex-Orts
Copy link

It has been established Build: [ESP_Easy_mega_20241210_neopixel_ESP32c3_4M316k_LittleFS_CDC_ETH Dec 10 2024]
It doesn't have 11,12,13 but 20,21 in gray.

@TD-er
Copy link
Member Author

TD-er commented Dec 11, 2024

That's the build from the web flasher or the one of this pull request?

@Alex-Orts
Copy link

@TD-er
Copy link
Member Author

TD-er commented Dec 11, 2024

OK, that one does not have these changes, so at least you have a way to recover easily :)

Now could you test again with the latest build from here: https://github.com/letscontrolit/ESPEasy/actions/runs/12260984392 ?
This has a newer ESP-IDF5.3 SDK

Remember you need to select a build without "factory" in the name when upgrading via the tools page of ESPEasy.

To be honest, I have no clue why your node was rebooting with these changes.
Or did you have one of those 'forbidden' GPIO pins selected to do something and then the reboots started?

@Alex-Orts
Copy link

Flashed via web, works. 12,13 checked on Wifi Status LED works. And 20,21 remained gray. How does Wifi Status LED work? For some reason on all firmware it periodically dims for a short time.

@TD-er
Copy link
Member Author

TD-er commented Dec 11, 2024

The status LED acts on network activity.
Depening on whether it is inverted or not, it lights up to max brightness on network activity and then gradually fades out.

The USB pins can be 'freed' by going to the tools->Advanced page and then for the ESPEasy console settings set the primary serial port to "HW Serial0" and uncheck the fallback option.

@Alex-Orts
Copy link

Alex-Orts commented Dec 11, 2024

But USB is 18,19. They are available on the contrary. And 20,21 are grey.

WiFi works very poorly. With USB connected

84 WiFiStatus: WL_CONNECTED 3 ESPeasy internal wifi status: Conn. IP Init
00:17:09.657 : (198452) Info : WD : Uptime 8 ConnectFailures 0 FreeMem 1985 96 WiFiStatus: WL_CONNECTED 3 ESPeasy internal wifi status: Conn. IP Init
00:17:39.657 : (198640) Info : WD : Uptime 8 ConnectFailures 0 FreeMem 198784 WiFiStatus: WL_CONNECTED 3 ESPeasy internal wifi status: Conn. IP Init
00:18:09.658 : (196844) Info : WD : Uptime 9 ConnectFailures 0 FreeMem 196988 WiFiStatus: WL_CONNECTED 3 ESPeasy internal wifi status: Conn. IP Init

@TD-er
Copy link
Member Author

TD-er commented Dec 11, 2024

What is working poorly for wifi?
Does it respond slow? Missing ping packets when you send pings to it?
Pages not loading?
The messages you show are just status info messages shown every 30 seconds.

I will have a look at GPIO 20/21 why they may be greyed out.
Can you share a screenshot of the GPIO boot state settings on the Hardware tab? This also shows what might be conflicting.

On my ESP32-C3 it shows RX0 and TX0 there, so those are default used for Serial0 and thus used by the ESPEasy console.
If your board doesn't use Serial0 but only USB-CDC, then you can set the console to use the CDC port and uncheck the "serial0 fallback" on the tools->Advanced page.

@Alex-Orts
Copy link

After unchecking the box Fallback to Serial 0: , they became available. Wifi also started working.

@TD-er
Copy link
Member Author

TD-er commented Dec 11, 2024

Hmm strange that changing that section would affect WiFi stability.
Maybe it was receiving lots of noise on those pins?

@Alex-Orts
Copy link

It seems that the USB connection is the one that has an effect. Even without starting the console.

@TD-er
Copy link
Member Author

TD-er commented Dec 11, 2024

Hmm that's odd as the console should not stall when nothing is reading from the USB CDC port.
Maybe worth looking into that code to see if there has been some changes in either the Arduino or the ESP-IDF code.
I thought only this code for ESP32-S2 was changed (which is using a completely different way of USB handling compared to all other ESP32-xx)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants