这是最新(主)开发分支的文档。如果您正在查找以前版本的文档,使用左侧的下拉菜单选择所需的版本。

PSRAM write,read

功能概述

此应用程序启动后执行下面几个操作:

  1. 从heap中分配PSRAM的内存

  2. 整数方式读写

  3. memcpy方式拷贝字符串到PSRAM,再读出来

  4. DMA方式拷贝1K字符串到PSRAM,然后打印PSRAM中的数据

环境要求

  1. Demo使用EVB板子,需要把EEPROM芯片旁边座子上的跳线帽全部加上

编译和烧录

示例位置:examples/peripheral/psram

编译、烧录等操作请参考:快速入门

运行结果

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