DSP28335用XINTF访问CPLD区域0地址上的数据,其中DSP2833x_Xintf.c文件设置如下: EALLOW;
SysCtrlRegs.PCLKCR3.bit.XINTFENCLK = 1; //开启XINTF时钟信号
XintfRegs.XINTCNF2.bit.XTIMCLK = 1; //基准时钟XTIMCLK = 1/2 SYSCLKOUT
XintfRegs.XINTCNF2.bit.WRBUFF = 0; //无写缓冲寄存器
XintfRegs.XINTCNF2.bit.CLKOFF = 1; //禁止XCLKOUT
XintfRegs.XINTCNF2.bit.CLKMODE = 1; //XCLKOUT=XTIMCLK/2
XintfRegs.XTIMING0.bit.XWRLEAD = 3; //区域0写建立时间为11b,周期数为6
XintfRegs.XTIMING0.bit.XWRACTIVE = 7; //有效时间为111b,周期数为14
XintfRegs.XTIMING0.bit.XWRTRAIL = 3; //跟踪时间为11b,周期数为6
// Zone read timing
XintfRegs.XTIMING0.bit.XRDLEAD = 3; //区域0读建立时间为11b,周期数为6
XintfRegs.XTIMING0.bit.XRDACTIVE = 7; //有效时间为111b,周期数为14
XintfRegs.XTIMING0.bit.XRDTRAIL = 3; //跟踪时间为11b,周期数为6
// double all Zone read/write lead/active/trail timing
XintfRegs.XTIMING0.bit.X2TIMING = 1; //比值2:1
// Zone will sample XREADY signal
XintfRegs.XTIMING0.bit.USEREADY = 1; //XREADY信号采样
XintfRegs.XTIMING0.bit.READYMODE = 1; //异步采样
XintfRegs.XTIMING0.bit.XSIZE = 3; //数据总线宽度,16位
GPIO设置为16位地址线,单独读取一个地址上的数据时,数据正确,但是地址总线低位XA0通过观察GPBDAT变量,发现一直处于高电平,不会随着地址改变而变低,其他总线位正确。另外多个地址先后取地址时,数据发生窜扰,读取到前一位地址数据或后一位数据,请问CPLD的时序相对DSP来说是过快还是过慢?要修改XINTF时序中的建立、有效、跟踪时间的哪一个? |