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

Getting No PSRAM found on first boot #287

Open
Drizzt321 opened this issue Feb 3, 2023 · 10 comments
Open

Getting No PSRAM found on first boot #287

Drizzt321 opened this issue Feb 3, 2023 · 10 comments

Comments

@Drizzt321
Copy link

So I got this esp32-cam, and when using your sketch I get No PSRAM found; camera cannot be initialised: Please check the board config for your module. as an error on first boot. Screenshot and full output is below.

I did ensure in Tools->PSRAM -> Enabled is set, using latest Arduino (2.0.3) and esp32 boards (2.0.6) is installed.

psram enabled

configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:1344
load:0x40078000,len:13836
load:0x40080400,len:3608
entry 0x400805f0
E (242) psram: PSRAM ID read error: 0xffffffff

====

esp32-cam-webserver: ESP32 camera server
Code Built: Feb  3 2023 @ 11:15:57
Base Release: 4.0


Fatal Error; Halting
No PSRAM found; camera cannot be initialised: Please check the board config for your module.
@sonofcy
Copy link

sonofcy commented Feb 3, 2023

You have the wrong board selected, it has to be AI Thinker ESP32-CAM

@Drizzt321
Copy link
Author

Instructions in the README says to use the generic ESP32 Dev Module

@sonofcy
Copy link

sonofcy commented Feb 3, 2023

THINK, does that have a camera? I have dozens of these and work with them all the time. The README is wrong.

@Drizzt321
Copy link
Author

Set the board to AI Thinker ESP32-CAM, same issue, No PSRAM found.

Note, this is NOT an AI-Thinker branded board, see Amazon link I have above, is what I'm trying to use. Wonder if this particular module, ESP32-S, just doesn't have any PSRAM.

@sonofcy
Copy link

sonofcy commented Feb 3, 2023

The board I am using is also NOT an AI-THINKER, it is similar to what you have. I do NOT fool around with the settings on the IDE board menu. I just compiled and it works.

@sonofcy
Copy link

sonofcy commented Feb 3, 2023

12:45:49.781 -> 0x1 (POWERON_RESET),boot:0x13 (S0x1 (POWERON_RESET),boot:0x13 (S0x1 (POWERON_RESET),boot:0x13 (S0x1 (POWERON_RESET),boot:0x13 (S0x1 (POWERON_RESET),boot:0x13 (S0x1 (POWERON_RESET),boot:0x13 (S0x1 (POWERON_RESET),boot:0x13 (S0x1 (POWERON_RESET),boot:0x13 (S0x1 (POWERON_RESET),boot:0x13 (S0x1 (POWERON_RESET),boot:0x13 (S0x1 (POWERON_RESET),boot:0x13 (S0x1 (POWERON_RESET),boot:0x13 (S0x1 (POWERON_RESET),boot:0x13 (S0x1 (POWERON_RESET),boot:0x13 (S0x1 (POWERON_RESET),boot:0x13 (S0x1 (POWERON_RESET),boot:0x13 (S0x1 (POWERON_RESET),boot:0x13 (S0x1 (POWERON_RESET),boot:0x13 (S0x1 (POWERON_RESET),boot:0x13 (S0x1 (POWERON_RESET),boot:0x13 (S0x1 (POWERON_RESET),boot:0x13 (S0x1 (POWERON_RESET),boot:0x13 (S0x1 (POWERON_RESET),boot:0x13 (S0x1 (POWERON_RESET),boot:0x13 (S0x1 (POWERON_RESET),boot:0x13 (S0x1 AST_FLASH_BOOT)
12:45:49.781 -> configsip: 0, SPIWP:0xee
12:45:49.781 -> clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
12:45:49.781 -> mode:DIO, clock div:1
12:45:49.781 -> load:0x3fff0030,len:1344
12:45:49.781 -> load:0x40078000,len:13836
12:45:49.781 -> load:0x40080400,len:3608
12:45:49.781 -> entry 0x400805f0
12:45:50.731 ->
12:45:51.617 -> ...
12:45:52.601 -> WiFi connected
12:45:52.601 -> Camera Ready! Use 'http://192.168.0.122' to connect

@Drizzt321
Copy link
Author

What were your compile settings? I didn't "mess around", I followed the README on the project. If that's wrong, then please tell me what the correct settings are.

@sonofcy
Copy link

sonofcy commented Feb 3, 2023

Ialmost never read README's, they get out of date the first change. My IDE is set up the same for any board, either ALL or DEFAULT compiler warnings, then all the usual stuff, I have NEVER changed any setting in the boards, I don't even see the PSRAM setting you changed. The sample sketch is set up for AI-THINKER, I specify the AI-THINKER board and it just works, I just tried it.
IMG_F36C4C3106FF-1
Screenshot 2023-02-03 at 13 10 39

@Ropese
Copy link

Ropese commented Apr 17, 2023

Good morning
I also have the psram problem I tried 3 esp32-s only one goes the others psram error I changed the camera modules but still the same.
how can it be that 1 goes and the others don't?
i tried with other skretch and other modules work too but not with this any idea?
Thank you

@Emstar
Copy link

Emstar commented Oct 4, 2023

EDIT: While the procedure below does work, as I feared it did cause problems when compiling projects for other boards. I found that as @sonofcy said, you must select the AI Thinker board type in the IDE, and NOT the ESP32 Dev Module as the docs say. With AI Thinker selected the PSRAM is detected without workarounds.


I have the same kind of ESP32-S board and had the same PSRAM problem when using board type ESP32 Dev Module.

I found the solution in this post: https://www.esp32.com/viewtopic.php?t=31247#p107434

In C:\Users\USERNAME\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.13\cores\esp32\esp32-hal-psram.c rig the PSRAM test:

//#if CONFIG_SPIRAM_SUPPORT || CONFIG_SPIRAM
#if 1

In esp32-cam-webserver.ino, in setup(), add this after the block of startup serial.print() statements near line 650.

    if (psramInit()) {
      Serial.print("PSRAM OK. Size: ");
      Serial.println(ESP.getFreePsram());
      }

In myconfig.h continue to use the default AI_THINKER definition.

While this worked there is probably a better way to do it. This is my first project, I don't know this environment or hardware at all. Modifying a core library file sucks and seems like it would break compatibility with other boards.

I also noticed that PSRAM did not seem to initialize properly on every bootup. Sometimes you have to push the reset button to get the board to come up.

If anyone can suggest the right way to implement this support without messing with esp32-hal-psram.c I would love to know.

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

No branches or pull requests

4 participants