• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..--

src/03-Apr-2024-8870

CMakeLists.txtD03-Apr-2024194 95

README.rstD03-Apr-20241.4 KiB5638

prj.confD03-Apr-2024131 54

sample.yamlD03-Apr-2024186 87

README.rst

1.. _spiram_test:
2
3Espressif ESP32 SPIRAM test
4###########################
5
6Overview
7********
8
9This sample allocates memory from internal DRAM and SPIRAM by calling
10:c:func:`k_malloc`, frees allocated memory by calling :c:func:`k_free` and
11checks if memory can be allocated again. Capability of allocated memory is
12decided by ESP_HEAP_MIN_EXTRAM_THRESHOLD. If size is less than
13ESP_HEAP_MIN_EXTRAM_THRESHOLD, memory is allocated from internal DRAM. If
14size is greater than ESP_HEAP_MIN_EXTRAM_THRESHOLD, memory is allocated from
15SPIRAM.
16
17Supported SoCs
18**************
19
20The following SoCs are supported by this sample code so far:
21
22* ESP32
23* ESP32-S2
24
25Building and Running
26********************
27
28Make sure you have your board connected over USB port.
29
30.. code-block:: console
31
32   west build -b esp32_devkitc_wrover samples/boards/esp32/spiram_test
33   west flash
34
35If using another supported Espressif board, replace the argument in the above
36command with a proper board name (e.g., `esp32s2_saola`).
37
38Sample Output
39=============
40
41To check output of this sample, run ``west espressif monitor`` or any other serial
42console program (e.g., minicom, putty, screen, etc).
43This example uses ``west espressif monitor``, which automatically detects the serial
44port at ``/dev/ttyUSB0``:
45
46.. code-block:: console
47
48   $ west espressif monitor
49
50.. code-block:: console
51
52    mem test ok! 209
53    SPIRAM mem test pass
54    mem test ok! 194
55    Internal mem test pass
56