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

Fix boot freeze when trying to init PSRAM on Pico D4 #6434

Merged
merged 2 commits into from
Mar 23, 2022

Conversation

s-hadinger
Copy link
Contributor

Summary

Fix a boot freeze when trying to initialize PSRAM on Pico D4.

When not setting CONFIG_SPIRAM_BOOT_INIT, the code in psramInit() probes for PSRAM, and when it does not detect any PSRAM, deconfigures GPIO16/17 except for ESP32D2WDQ5 and ESP32PICOD2. The test is missing ESP32PICOD4 for which GPIO16/17 are used for Flash and should not be deconfigured.

Tasmota uses a single firmware for multiple ESP32 variants, with or without PSRAM. So it's important that the absence of PSRAM on Pico D4 allows for normal boot.

Impact

Allow normal boot on Pico D4 without PSRAM support

@Jason2866
Copy link
Collaborator

@me-no-dev Could you please merge or add to milestone v2.0.3 ? Thx!

Copy link
Collaborator

@mrengineer7777 mrengineer7777 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code is clean. Reason makes perfect sense to me.

@me-no-dev
Copy link
Member

When not setting CONFIG_SPIRAM_BOOT_INIT, the code in psramInit() probes for PSRAM

Only if you have -DBOARD_HAS_PSRAM in your flags. Also, PICO-D4 does support PSRAM and I do have a couple of modules here that are configured like that :)

@s-hadinger
Copy link
Contributor Author

s-hadinger commented Mar 16, 2022

Right. But it any case gpio 16/17 should never be unconfigured on Pico D4. Maybe you prefer to add the test below.

Edit: how is psram connected to Pico D4? Using gpio 16/17?

@Jason2866
Copy link
Collaborator

Screenshot from Datasheet, regarding to this GPIO 16/17 is used for flash connection
Bildschirmfoto 2022-03-16 um 12 39 44

@s-hadinger
Copy link
Contributor Author

Oh yes, I over-read it. So I need to change the fix to allow PSRAM on Pico D4 but not unconfigure GPIO 16/17 on Pico D4.

Will do a bit later.

@s-hadinger
Copy link
Contributor Author

@me-no-dev I changed the proposed patch to allow PSRAM on Pico D4 but not deconfigure GPIO16/17 on Pico D4 if no PSRAM is found.

@s-hadinger
Copy link
Contributor Author

@me-no-dev gentle bump. Is the new version ok with you?

@me-no-dev
Copy link
Member

@me-no-dev gentle bump. Is the new version ok with you?

yes! :) Thanks!

@me-no-dev me-no-dev merged commit 8fe0efe into espressif:master Mar 23, 2022
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.

4 participants