This is the documentation for the latest (main) development branch. If you are looking for the documentation of previous releases, use the drop-down menu on the left and select the desired version.

PSRAM Write,Read

Overview

After the application starts, perform the following operations:

  1. Allocate the memory of PSRAM from the heap

  2. Integer mode reading and writing

  3. Copy the string to PSRAM in memcpy mode and read it out

  4. Copy a 1K string to PSRAM using DMA, and then print the data stored in PSRAM.

Requirements

  1. The demo uses an EVB (Evaluation Board) and requires that all jumper caps on the socket next to the EEPROM chip be installed.

Building and Flashing

Example location: examples/peripheral/psram

For operations such as compiling and burning, please refer to: [Quick Start Guide] (../../../../get_started/index. html # build function)

Running Result

D/dt              [0.000] add device iflash
D/ptb             [0.002] partition table base 0xe000
D/ft              [0.002] ft_0 base 0, ft_1 base 1000
D/ft              [0.002] ft init too
D/ft              [0.002] ft init 1
D/main            [0.004] boot reason 0
D/main            [0.004] heap size 2369888(2.26MB)
D/main            [0.004] flash size 0x200000(2MB)
I/example_psram   [0.004] psram write/read example.

I/example_psram   [0.006] write 32bits integer 0x11223344 to address=30000018
I/example_psram   [0.006] read 32bits integer from address=30000018,value=0x11223344
I/example_psram   [0.006] CPU copy 0123456789abcdefghij to address=30000018
I/example_psram   [0.006] CPU read string from address=30000018,value=0123456789abcdefghij
I/example_psram   [0.008] DMA copy string to address=30000018,string is:
0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789abcdefghijklmnopqrstuvwx
I/example_psram   [0.092] DMA read string from address=30000018,value is
=0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789abcdefghijklmnopqrstuvwx