F28335的程序中只包含GPIO点亮LED灯和对总线写(或读)的操作,上电之后,会比较频繁的出现死机现象,而且造成死机的点都是在总线访问语句处。但是,只要上电之后程序能够正常运行,那么在运行过程中却不会出现死机问题。请教这个问题该如何解决?
说明:
1. 总线上挂接了373锁存器(Zone0)和SRAM(Zone6和Zone7);
2. 评估板上也存在一样的问题。
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.
Forrest,
Thanks for your advice first.
我采用例程做了这个测试,问题依然存在。 程序仅仅开一个定时器中断,在中断250ms中执行LED灯TOGGLE操作和Zone7区间读写操作。
程序配置中,XHOLDA and XHOLD pin 作为默认输入,硬件通过39欧姆电阻和LED接3.3V上拉。
从 spru949.pdf 的 table 1-9上看,HOLD pin is high, HOLDS registry的值是1,表示外部设备请求XINTF总线。
“访问之前最好需要在 XINTFCNF2 中先判断一下”, 如何判断?
关于HOLD是如果用到了,才需要在XINTCNF2[HOLDS]判断一下,确认一下是否在Stalled状态;您没有用到。
否则如您谈到用例程问题依然存在,我认为是硬件问题,您确认一下是硬件上有短路,还是因为布线问题导致信号不稳定。
调低总线运行频率,用下面这类程序测试外部的RAM能够通过测试吗?
for(i = 0; i < 0xFFFF; i++)
{
*(ExRamStart + i) = 0x5555;
if(*(ExRamStart + i) != 0x5555)
{
while(1);
}
}
for(i = 0; i < 0xFFFF; i++)
{
*(ExRamStart + i) = 0xAAAA;
if(*(ExRamStart + i) != 0xAAAA)
{
while(1);
}
}
Hi Forrest,
I found the answer in sprz272g.pdf . Please reference Page.9 .
Possible Incorrect Operation of XINTF Module After Power Up
上电后XINTF模块可能不正确的操作
The XINTF module may not get reset properly upon power up. When this happens,
accesses to XINTF addresses may cause the CPU to hang. This issue occurs only upon
power up. It does not happen for other resets such as a reset initiated by the watchdog
or an external (warm) reset using the XRS pin.
上电时XINTF模块可能不能正常重置。当它发生时,访问XINTF地址可能会导致CPU挂起。
这个问题仅发生在上电时。不会发生在其他重置时,例如:看门狗发起的或通过外部使用XRS 引脚的热重置。
After coming out of reset, software should force a watchdog (WD) reset if WDFLAG = 0
in the WDCR register. WDFLAG = 0 implies that an external reset occurred, for example,
a power-on reset. After exiting the WD reset, WDFLAG will be 1. In this case, software
should clear the WDFLAG bit before continuing normal code execution. This issue
affects only the XINTF module
复位出来后,如果WDCR寄存器中WDFLAG =0,软件应该置位看门狗(WD)。
WDFLAG = 0 意味着外部重置发生, 例如,一个上电复位。
在退出WD复位,WDFLAG将置为1。 在这种情况下,软件在继续执行正常代码前应该清除WDFLAG。
这个问题只会影响XINTF模块