Skip to main content
CAPOSIENA.Philippe
Associate II
April 8, 2016
Question

Watch dog reset flag on STM32F051

  • April 8, 2016
  • 2 replies
  • 728 views
Posted on April 08, 2016 at 18:43

Hello,

i'm using a STM32F051 and i want to know if the reset is a watch dog reset or not.

I read the flag IWDGRSTF in the CSR register (RCC peripheral) but this bit is always set when a reset occurs.

I tried with no watch dog activated and the result is the same.

What's wrong with it ?

Thanks

Philippe
    This topic has been closed for replies.

    2 replies

    Tesla DeLorean
    Guru
    April 8, 2016
    Posted on April 08, 2016 at 19:20

    Do you clear the flag between tests?

    Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
    CAPOSIENA.Philippe
    Associate II
    April 11, 2016
    Posted on April 11, 2016 at 11:16

    Hello,

    yes i clear flags by writing bit RMVF in the CSR register after reading the CSR register.

    The flag IWDGRSTF is always set at reset even if watch dog is completely disabled.

    Philippe