2009-12-09 12:48 AM
Period of IWDG issue.
2011-05-17 06:04 AM
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.2011-05-17 06:04 AM
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. :p2011-05-17 06:04 AM
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,