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.

28335的bug怎么解决

在28335  Silicon Errata  Literature Number: SPRZ272G

中有写到

Advisory Memory: Possible Incorrect Operation of XINTF Module After Power Up
Revision(s) Affected 0, A
Details 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.
Workaround(s) 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.

即XINTF模块可能因为上电使DSP宕机,但是这个说明不是很清楚

有能给讲明白,提供解决方案的吗?比如说上电后怎么弄 能避免这个问题

  • 上电XINTF的地址会导致CPU挂起   复位等不会出现这种情况的

     

  • dia son

    即XINTF模块上电后,有可能没能复位成功,在这种情况访问XINTF会导致死机。但是如果是看门狗复位或是XRS复位,则不会出现这种情况。

    所以为了避免这种情况,则在初始化程序中去做一个看门狗复位即可。

    判断WDFLAG位,如果WDFLAG = 0,表示是上电复位,需要进行看门狗复位。

    如果WDFLAG=1了,就表示看门狗复位过了,就不用处理了。

    所以,上电后,芯片还需要通过看门狗产生一次复位。WDCR寄存器。

    Eric

  • Eric,

          您的讲解非常详细,一下明白了。上电后怎么能快速让看门狗只复位一次呢 

    这个不知较好的解决思路是什么,请教,谢谢。

  • 你的回答很让人满意,还有最后一个问题,他说看门狗复位后如果检测到WDFLAG == 1 ,就清除该位,不知道为什么要这么做 

    貌似没有必要

  • 让看门狗产生复位,可以对WDCR.WDCHK写一个非101的值,

    Watchdog check.
    0,0,0 You must ALWAYS write 1,0,1 to these bits whenever a write to this register is performed
    unless the intent is to reset the device via software.
    other Writing any other value causes an immediate device reset or watchdog interrupt to be taken.
    Note that this happens even when watchdog module is disabled. Do not write to WDCHK bits
    when the watchdog module is disabled. These bits can be used to generate a software reset
    of the device. These three bits always read back as zero (0, 0, 0)

    Eric

  • 还有最后一个问题,他说看门狗复位后如果检测到WDFLAG == 1 ,就清除该位,不知道为什么要这么做 

    Eric:从解决这个bug的角度上来讲,我认为是不需要清除。但是把WDFLAG清除了,类似恢复原状。

  • WDFLAG在编译器中默认是没有的,写程序判断SysCtrlRegs.WDCR&0x80是否为0来判断是不是上电复位,可实际应用一直检测到该位为1,即看门狗复位;

    复位电路选用TI推荐的PS767D301的方式;

    相关测试程序如下

     上电运行:

    EALLOW;
    DogState= SysCtrlRegs.WDCR;
    if( DogState & 0x80 == 0 ) //WDFLAG = 0,表示是上电复位,需要进行看门狗复位
    {
    Tpoweron=1;
    }
    EDIS;

    然后关狗,

    主程序中代码如下:

    if(Tpoweron)
    SCIB_TXD( 0x11 );
    else
    SCIB_TXD( 0x00 );
    wait_1us( 100000 );

    上电复位和按键复位,使用串口调试助手接收到一直是0x00;

    这边用了几百片28335,基本上都有XINTF访问死机的情况,测试到有1片出现的特别频繁