Skip to main content
Visitor II
January 20, 2010
Question

WDG Reset event flag

  • January 20, 2010
  • 3 replies
  • 871 views
Posted on January 20, 2010 at 01:10

WDG Reset event flag

    This topic has been closed for replies.

    3 replies

    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 09:58

    Hello,

    I am working on STR91x processor

    I am trying to use WDG_RST(WDG Reset event flag) in SCU_SYSSTATUS register.

    While initializing PLL, after setting SCU_FLAG_LOCK

    SCU->SYSSTATUS |=SCU_FLAG_LOCK

    all other bits in SYSSTATUS register have been reset, so I am loosing WDG_RST information.

    I have also tried to do the same thing manually in debugger and observed the same beviour.

    Can anybody help?

    Thank you

    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 09:58

    Hello,

    do you perhaps have a solution for this. I am having the same problem that after a software watchdog reset, the SCU->SYSSTATUS did not set the WDG_RST flag accordingly.

    Thank you!

    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 09:58

    That's because the SYSSTATUS register bits are cleared by writing a 1. You're or'ing in the current value of the SYSSTATUS register to itself, effectivly clearing each bit that's been set.

    If you want to clear the SCU_FLAG_LOCK bit it you should be doing this-

    SCU->SYSSTATUS = SCU_FLAG_LOCK;