2812--XINTF奇怪问题!
使用2812的XINTF扩展几个外设,用到XZCS0AND1,XZCS2,于是开了一个最小系统板,编写了1个简单的测试程序,测试发现XZCS0AND1,XZCS2都没有片选信号输出!
同样的程序在开发板上运行,XZCS0AND1,XZCS2片选信号输出正常!
程序如下: unsigned int * LED_PORT = (unsigned int *) 0x234c;//0x434c; unsigned int * Z2_PORT = (unsigned int *) 0x80000;//0x434c;
for(; { * LED_PORT=1; * Z2_PORT=0; KickDog(); }
配置程序如下: XintfRegs.XINTCNF2.bit.XTIMCLK = 0x0000; XintfRegs.XTIMING0.bit.USEREADY = 0; XintfRegs.XTIMING0.bit.X2TIMING = 0; XintfRegs.XTIMING0.bit.XSIZE = 3; XintfRegs.XTIMING0.bit.XRDLEAD =1; XintfRegs.XTIMING0.bit.XWRLEAD = 1; XintfRegs.XTIMING0.bit.XWRTRAIL = 1; XintfRegs.XTIMING0.bit.XRDTRAIL = 1; XintfRegs.XTIMING0.bit.XWRACTIVE = 7; XintfRegs.XTIMING0.bit.XRDACTIVE = 7;
请教出现这种问题是什么原因造成的,是不是电路有问题?问题在那里? |