Skip to main content
Visitor II
December 9, 2009
Question

Period of IWDG issue.

  • December 9, 2009
  • 3 replies
  • 930 views
Posted on December 09, 2009 at 09:48

Period of IWDG issue.

    This topic has been closed for replies.

    3 replies

    zsuAuthor
    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 15:04

    Default period of IWDG is about 15.90 ms. I try to change it to 63.70 ms by using instruction below. But it does not work. Its period keeps at 15.90 ms.

    Any trick ? Your help will be appreciated.

    During debugging, IWDG_PR keeps zero (default value).

    IWDG_KR = 0x55 ; // Enable access to IWDG_PR and IWDG_RLR

    IWDG_PR = 0x02 ; // divide by 16.

    IWDG_RLR= 0xff ; // Time-out period at about 63.7ms.

    zsuAuthor
    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 15:04

    Solved. There is a trick.

    If you use instruction in order as below, it doesn't work.

    IWDG_KR = 0x55 ; // Enable access to IWDG_PR and IWDG_RLR

    IWDG_PR = 0x02 ; // divide by 16.

    IWDG_RLR= 0xff ; // Time-out period at about 63.7ms.

    IWDG_KR = 0xcc ; // Start IWDG.

    To make it work, you have to put instructions in order as below.

    IWDG_KR = 0xcc ; // Start IWDG.

    IWDG_KR = 0x55 ; // Enable access to IWDG_PR and IWDG_RLR

    IWDG_PR = 0x02 ; // divide by 16.

    IWDG_RLR= 0xff ; // Time-out period at about 63.7ms.

    :p

    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 15:04

    Hi zsu,

    I think you should add

    IWDG_KR = 0x55 ; start the IWDG

    after

    IWDG_RLR= 0xff ; // Time-out period at about 63.7ms.

    I think IWDG_KR = 0x55 ;doesn't start the IWDG but It enables access to

    RLR and PR registers.

    Let me know if you have some news.

    With regards,