2.14. SDRAM

Overview

在SDK中提供SDRAM动态开关的接口。

2.14.1. 应用实例

示例演示:

example: 具体示例代码详见 apps/common/movable/example.c , 示例工程实现必须在 apps/demo/demo_audio/include/app_config.h 中定义宏 CONFIG_NO_SDRAM_ENABLECONFIG_DYNAMIC_SDRAM_ONOFF_ENABLE

//sdram_cfg_info_t结构体的参数注释具体可参考isd_config_rule.c里面sdram相关配置的注释
static const struct sdram_cfg_info_t sdram_cfg = {
    .sdram_size = 2 * 1024 * 1024,  //封装sdram的容量
    .sdram_test_size = 4 * 1024,
    .sdram_config_val = -1,
    .sdram_mode = 0,
    .sdram_pll3_en = 0,
    .sdram_pll3_nousb_en = 0,
    .sdram_cl = 2,  //sdram时钟配置
    .sdram_rlcnt = 1,
    .sdram_d_dly = 1,
    .sdram_q_dly = 1,
    .sdram_phase = 3,
    .sdram_dq_dly_trm = 4,  //sdram时钟配置
};

sdram_init(&sdram_cfg); //打开sdram

sdram_uninit(); //关闭sdram