在EMIF通信过程中,两个片选信号对应一个地址信号,请问这有可能会是什么问题呢???求解答,谢谢!
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
/************************异步等待配置**************/
/* Assign values to async wait config structure */
//asyncWaitConfig.waitPol = CSL_EMIF_WP_LOW;//与NAND有关,不用设置
asyncWaitConfig.waitPin = waitPin;
asyncWaitConfig.waitCycles = CSL_EMIF_ASYNCWAITCFG_WAITCYCLE_DEFAULT;//默认值为0x80
/***************对异步传输的初始化配置的过程************/
/* Assign values to nand async config structure */
asyncConfig.selectStrobe = CSL_EMIF_ASYNCCFG_SELECTSTROBE_DEFAULT;
asyncConfig.ewMode = CSL_EMIF_ASYNCCFG_WEMODE_DEFAULT;
asyncConfig.w_setup = CSL_EMIF_ASYNCCFG_WSETUP_DEFAULT;
asyncConfig.w_strobe = CSL_EMIF_ASYNCCFG_WSTROBE_DEFAULT;
asyncConfig.w_hold = CSL_EMIF_ASYNCCFG_WHOLD_DEFAULT;
asyncConfig.r_setup = CSL_EMIF_ASYNCCFG_RSETUP_DEFAULT;
asyncConfig.r_strobe = CSL_EMIF_ASYNCCFG_RSTROBE_DEFAULT;
asyncConfig.r_hold = CSL_EMIF_ASYNCCFG_RHOLD_DEFAULT;
asyncConfig.turnAround = CSL_EMIF_ASYNCCFG_TAROUND_DEFAULT;
asyncConfig.aSize = CSL_EMIF_ASYNCCFG_ASIZE_DEFAULT;
/*****************对异步传输进行emif配置************/
/* Assign values to config structure */
asyncCfg.chipSelect = chipSel;
//应该是需要加RAMwidth的,而且还有emifopmode工作模式,在CSL_NandConfig里面有定义这两部分,看看其他结构体里面有没有
//nandCfg.nandWidth = CSL_EMIF_8_BIT;//还需不需要定义RAM的width
//nandCfg.nandPageSize = CSL_NAND_PAGESZ_512;//这个应该不用了吧,没有page
asyncCfg.emifAccess = CSL_EMIF_16BIT;//改成了16位
nandCfg.emifOpMode = CSL_EMIF_OPMODE_POLLED;
//nandCfg.nandType = CSL_NAND_SMALL_BLOCK;//同样不需要
asyncCfg.asyncWaitCfg = &asyncWaitConfig;
asyncCfg.asyncCfg = &asyncConfig;
/********************进行配置*********************/
/* Configure Asynchronous settings */
status = EMIF_asyncConfig(hEmif, &asyncCfg); //在这里面需要把RAMwidth和EMIFopmode加进去
if(status != CSL_SOK)
{
printf("EMIF Asynchronous Config Failed!!\n");
return(result);
}
这是EMIF配置部分,是通过例程修改的,现在地址增量是1,但是每此数据都是读两遍,不知道是怎么回事。