问题:读取SDRAM数据全是FFFF。
用的是W9825G6KH-6I
深入调试发现:
初始化sdram_init_sequence(XMC_CMD_BANK1);中:
最后一步
sdram_cmd_struct.cmd = XMC_CMD_LOAD_MODE;
sdram_cmd_struct.auto_refresh = 1;
sdram_cmd_struct.cmd_banks = cmd_bank;
sdram_cmd_struct.data = (uint32_t)SDRAM_BURST_LEN_1 | SDRAM_BURST_SEQUENTIAL |
SDRAM_CAS_LATENCY_3 | SDRAM_OPERATING_MODE_STANDARD |
SDRAM_WR_BURST_SINGLE;
xmc_sdram_cmd(&sdram_cmd_struct);
timeout = 0xFFFF;
while((xmc_flag_status_get(XMC_BANK5_6_SDRAM, XMC_BUSY_FLAG) != RESET) && (timeout > 0))
{
timeout --;
}
发现XMC_BUSY_FLAG一直不等于RESET |