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

ESP32-S3 PSRAM Not Maintained #917

Closed
raphaelhetzel opened this issue Nov 9, 2023 · 3 comments
Closed

ESP32-S3 PSRAM Not Maintained #917

raphaelhetzel opened this issue Nov 9, 2023 · 3 comments

Comments

@raphaelhetzel
Copy link
Contributor

raphaelhetzel commented Nov 9, 2023

Hi,
while experimenting with the MMU (tried mmaping flash) I noticed that the PSRAM on the ESP32-S3 does not predictably maintain the set value.
I would assume it is only maintained while it is in cache.

One can replicate the results by modifying the PSRAM example as shown below.
The example also seems to be broken in its default state (Exception occured 'LoadProhibited' when creating the string)
I tested this on two ESP32-S3s with 8MB of PSRAM.

Is this reproducible or did I misinterpret how it can be used?
Thanks for any hints.

    ...
    println!("Going to access PSRAM");

    unsafe {
        let start = psram::psram_vaddr_start() as *mut u8;
        for i in 0..psram::PSRAM_BYTES {
            *start.add(i) = 0xAB;
            if(*start.add(i) != 0xAB) {
                println!("failed set");
            }
        }
        for i in 0..psram::PSRAM_BYTES {
            if(*start.add(i) != 0xAB) {
                println!("failed check");
            }
        }
    }

    loop {}
@github-project-automation github-project-automation bot moved this to Todo in esp-rs Nov 9, 2023
@raphaelhetzel raphaelhetzel changed the title ESP32-S3 PSRAM Not Stable ESP32-S3 PSRAM Not Maintained Nov 9, 2023
@bjoernQ
Copy link
Contributor

bjoernQ commented Nov 9, 2023

What exact ESP32-S3 boards are that?

Background: there are different PSRAM chips and we don't support all of them. (Probably more a thing for older ESP32)
Might your PSRAM be octal-SPI-RAM?

If the example already fails unmodified then something is quite wrong

@raphaelhetzel
Copy link
Contributor Author

raphaelhetzel commented Nov 9, 2023

Ok, sorry for causing a fuss here, turns out I just misread the datasheet.
I was most testing on a https://www.lilygo.cc/products/t5-4-7-inch-e-paper-v2-3, which has a ESP32-S3-WROOM-1-N16R8, which actually uses octal-SPI RAM. With the correct RAM type selected this issue does not not exist.

@bjoernQ
Copy link
Contributor

bjoernQ commented Nov 10, 2023

Thanks for confirmation! Great to hear it's working for you
I guess we can close this, then

@bjoernQ bjoernQ closed this as completed Nov 10, 2023
@github-project-automation github-project-automation bot moved this from Todo to Done in esp-rs Nov 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

2 participants