• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

How to use ESP32 Wrover SPI Flash and PSRAM

Q&A Forum › How to use ESP32 Wrover SPI Flash and PSRAM
1 Vote Up Vote Down
HUNG CHIN HSIEH asked 3 years ago
5 Answers
0 Vote Up Vote Down
HUNG CHIN HSIEH answered 3 years ago

I am using a ESP32 Wrover which has 4MB SPI flash and 8MB PSRAM, I am able to make PSRAM works by using the (uint16_t*)ps_malloc(153600) to acxcess the PSRAM . However, I had hard time to use the SPI flash.
I had include the https://github.com/espressif/arduino-esp32/blob/master/tools/sdk/include/esp32/rom/spi_flash.h into my program and use the esp_rom_spiflash_write(uint32_t dest_addr, const uint32_t *src, int32_t len); and esp_rom_spiflash_read(uint32_t src_addr, uint32_t *dest, int32_t len); to do write an dread the SPI flash but it seems not working
Is there a SPI Flash test code that I can use for testing? 

0 Vote Up Vote Down
Sara Santos Staff answered 3 years ago

Hi.
I think you should use these functions instead (line93 and 139): https://github.com/espressif/arduino-esp32/blob/master/tools/sdk/include/spi_flash/esp_spi_flash.h
Can you try them and see if they work?
I hope this helps.
Regards,
Sara

0 Vote Up Vote Down
HUNG CHIN HSIEH answered 3 years ago

Hi Sara, 
Thanks for your help. I tried line93 and 139. unfortunately, it was not working and the symptom is different. it will cause the system reset no matter is line 93 or line 139. 
dose it need any other setup before running line 93 and line 139?
Regards,
Richard Hsieh
 

0 Vote Up Vote Down
Sara Santos Staff answered 3 years ago

Hi Richard.
Honestly, I don’t know. I’m not familiar with those functions and all the documentation I’ve found about that was for ESP-IDF.
Have you taken a look at the following Units of the ESP32 course? Maybe these might help.

  • https://rntlab.com/module-2/esp32-flash-memory-store-permanent-data-write-and-read/
  • https://rntlab.com/module-12/esp32-spiffs-spi-flash-file-system/

Regards,
Sara

0 Vote Up Vote Down
HUNG CHIN HSIEH answered 3 years ago

Hi Sara,
Thanks. I will try to find a way. 
Regards,
Richard

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [eBook Updated] SMART HOME with RPi, ESP32, and ESP8266 (version 1.2) March 8, 2023
  • [eBook Updated] ESP32-CAM Projects (version 1.3) January 7, 2023

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2023 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.