-
Notifications
You must be signed in to change notification settings - Fork 215
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
ESP32 PSRAM behaves erratically if flashed using 80Mhz flash mode #1566
Comments
Could you try changing this locally in esp-hal and seeing if with the correct mode it works? |
Yes is does. I've been running with it set (unconditionally) to |
I think the comment |
I poked around at this a little bit. I think that the features can be removed completely, and instead we can pass this to |
Oh! Lines 215 to 235 in 45806df
We can of course make the RAM size and the flash-frequency a run-time config - but I think we should keep a |
I think that should be fine, we will probably need at least one feature because at some point we'll need to resolve #2027 by adding or changing the way we compile some things. Funnily enough that issue doesn't actually affect the s2 :D. I think we just need a single |
I guess we need to keep both features - also ESP-IDF does this
We could just include both implementations and decide at runtime but a lot of that code needs to live in IRAM so I'm not sure that is the best option |
Closed via #2178 |
Hello, I've been trying out the example let peripherals = esp_hal::init(esp_hal::Config::default());
let (start, size) = psram::init_psram(
peripherals.PSRAM,
psram::PsramConfig {
ram_frequency: esp_hal::psram::SpiRamFreq::Freq80m,
..Default::default()
},
);
// gets here
init_psram_heap(start, size);
// but not here Should I change anything else and/or is this feature supported on all S3 or it also requires some support in the chip/board? |
I've been experiencing some erratic behaviour in my ESP32 trying to enable PSRAM on my WROOM-E module (confirmed to have an 8MB PSRAM module).
Attempting to synthesize this down to a broken test case, I generated a new esp-template project, and replaced the heap section with:
And changed the
init_heap
call to be:This actually works as expected when you espflash with the default settings. However, if you bump up the flash speed to 80mhz with
-f 80mhz
then I've seen it either:LoadProhibited
during PSRAM initIllegalInstruction
during PSRAM init.I think this is because the esp32 HAL PSRAM code assumes that you're running in 40mhz Flash/40mhz PSRAM mode:
The text was updated successfully, but these errors were encountered: