Closed ve2cfb closed 1 year ago
Hi Pierre, you are already a bit ahead of the times. But thanks for the tip, I will take that into account with IDF 5.0. I assume that the PSRAM is connected via Octal-SPI. Did you check Octal Mode in menuconfig?
Hi Wolle,
Yes the Octal-SPi is already set. No problem with that. By the way, my ESP32-S3 N16R8 work perfectly except for not printing line 1748. if(psramInit()) { Serial.printf("PSRAM total size: %d bytes\n", esp_spiram_get_size()); } else { Serial.printf(ANSI_ESC_RED "PSRAM not found! MiniWebRadio does not work without PSRAM!" ANSI_ESC_WHITE); return;}
I did try my other "ESP32-DevKitC-VE ESP32-WROVER-E 8MB FLASH" and it print the PSRAM info. Go figure...
Pierre
How did you do that? The compiler grumbles with me. Are you already using IDF V5...?
Hello Wolle,
to recap... i am still at idf V4xxx (check my compile output below) In Config Menu, Octal-SPi is set. my code for the paraminit() at line 1748, is the same as this code: if(psramInit()) { Serial.printf("PSRAM total size: %d bytes\n", esp_spiram_get_size()); } i never used ESP_PSRAM_GET_SIZE() because it gives me an error like you.
Right now i am questioning my project configuration in PIO HOME like "Platform", "Board" etc, etc. As i have mentioned before, my other esp32-Wrover 8M psram does print the psram size.
Here is the compile ouput.
------------------------------------------------------------------------------------------------------------------------------------------------Verbose mode can be enabled via -v, --verbose
option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/ESP32-S3-DevKitC-1-N16R8.html
PLATFORM: Espressif 32 (6.4.0+sha.516520f) > Espressif ESP32-S3-DevKitC-1-N16R8V (16 MB QD, 8MB PSRAM)
HARDWARE: ESP32S3 240MHz, 320KB RAM, 16MB Flash
DEBUG: Current (esp-builtin) On-board (esp-builtin) External (cmsis-dap, esp-bridge, esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES:
??????????????????????????????????????????????????????????????????
Warning! Arduino framework as an ESP-IDF component doesn't handle the variant
field! The default esp32
variant will be used.
?????????????????????????????????????????????????????????????????
Reading CMake configuration... LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf LDF Modes: Finder ~ chain, Compatibility ~ soft Found 45 compatible libraries Scanning dependencies... Dependency Graph |-- ESP32-vs1053_ext @ 1.0.10+sha.b61dab0 |-- ESP32-audioI2S-master @ 2.0.0+sha.3f64031 |-- Arduino_JSON @ 0.2.0+sha.c282cb6 |-- FFat @ 2.0.0 |-- SPIFFS @ 2.0.0 |-- WiFiClientSecure @ 2.0.0 |-- ac101 |-- es8388 |-- ftpsrv |-- IR-Remote-Control |-- rtime |-- SoapESP32 @ 1.1.5 |-- tftLib |-- websrv |-- wm8978 |-- ESPmDNS @ 2.0.0 |-- FS @ 2.0.0 |-- Preferences @ 2.0.0 |-- SD_MMC @ 2.0.0 |-- SPI @ 2.0.0 |-- Ticker @ 2.0.0 |-- WiFi @ 2.0.0 |-- Wire @ 2.0.0 Building in release mode Running menuconfig... [0/1] cmd.exe /C "cd /D C:\Users\Pierre\Documents\PlatformIO\ESP32-Min...erre/Documents/PlatformIO/ESP32-MiniWebRadio-V2.13A/sdkconfig.esp32s3" C:/Users/Pierre/.platformio/packages/framework-espidf/Kconfig:14: warning: IDF_ENV_FPGA has 'option env="IDF_ENV_FPGA"', but the environment variable IDF_ENV_FPGA is not set Loaded configuration 'C:/Users/Pierre/Documents/PlatformIO/ESP32-MiniWebRadio-V2.13A/sdkconfig.esp32s3' No changes to save (for 'C:/Users/Pierre/Documents/PlatformIO/ESP32-MiniWebRadio-V2.13A/sdkconfig.esp32s3') ======================================================== [SUCCESS] Took 168.89 seconds
Environment Status Duration
esp32s3 SUCCESS 00:02:48.887 ========================================================= 1 succeeded in 00:02:48.887
Many thanks for your time. Pierre
Hello Wolle,
i found a work around and now it does print the psram info on the Serial monitor.
i did a serial.printf just before the psramint() .
I dont know why it is working.
I got the infor from Espressif: https://espressif-docs.readthedocs-hosted.com/projects/esp-faq/en/latest/software-framework/storage/psram.html#:~:text=For%20ESP32%20modules%2C%20the%20esp_spiram_get_size,for%20memory%20allocation%20and%20management.
This is my esp32-s3 Wroom-1 N16R8
Pierre
Hello Pierre, changed the order now, it doesn't matter for my boards, hope it works for you. Soon will Arduino V3... with IDF V5... appear, then your suggestion from the first post takes effect.
many greetings Wolle
Hello Wolle, everything is ok now with 2.13B here is a Serial Monitor ouput...
ESP32 Chip: ESP32-S3 Arduino Version: 2.0.13 ESP-IDF Version: 4.4.5 MiniWebRadio Version 2.13b Sep 29/2023 ARDUINO_LOOP_STACK_SIZE 8192 words (32 bit) FLASH size 16777216 bytes, speed 80 MHz <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< CPU speed 240 MHz SDMMC speed 40 MHz TFT speed 40 MHz PSRAM total size: 8388608 bytes <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
00:00:00
00:00:00
00:00:00 MiniWebRadio V2
00:00:00
00:00:00
00:00:00 setup: .... Arduino is pinned to core 1
00:00:00 tft_info: . init ILI9488
00:00:00 setup: .... Init SD card
00:00:00 setup: .... SD card found, 9522.6 MB by 15240.0 MB free
00:00:01 setup: .... seek for stations.csv
00:00:01 setup: .... stations.csv found
00:00:01 setup: .... seek for WiFi networks
========================================================================
Again, many many thanks. Pierre
Closing
Hello Wolle,
While doing some test, i wanted to check the PSRAM size and to my surprise, nothing is printing for psraminit(). i have a esap32-s3 N16R8
https://www.aliexpress.com/item/1005004617322170.html?spm=a2g0o.order_list.order_list_main.35.2c631802Im0tmz
Here is the output of the Serial Monitor:
---- Opened the serial port COM13 ---- [ 993][I][esp32-hal-psram.c:96] psramInit(): PSRAM enab
ESP32 Chip: ESP32-S3 Arduino Version: 2.0.13 ESP-IDF Version: 4.4.5 MiniWebRadio Version 2.13a Sep 23/2023 ARDUINO_LOOP_STACK_SIZE 8192 words (32 bit) FLASH size 16777216 bytes, speed 80 MHz CPU speed 240 MHz SDMMC speed 40 MHz TFT speed 40 MHz **** nothing printed for the psraminit()
in main.cpp at line 1748 if(psramInit()) { Serial.printf("PSRAM total size: %d bytes\n", esp_spiram_get_size()); }
This might be of interest...
https://docs.espressif.com/projects/esp-idf/en/latest/esp32/migration-guides/release-5.x/5.0/system.html
PSRAM[] (https://docs.espressif.com/projects/esp-idf/en/latest/esp32/migration-guides/release-5.x/5.0/system.html#psram)
The target-specific header file spiram.h and the header file esp_spiram.h have been removed. A new component esp_psram is created instead. For PSRAM/SPIRAM-related functions, users now include esp_psram.h and set the esp_psram component as a component requirement in their CMakeLists.txt project files.
esp_spiram_get_chip_size and esp_spiram_get_size have been deleted. You should use esp_psram_get_size instead.
Pierre