- #include "iwdg.h"
- #include "stm32f2xx_iwdg.h"
- void IWDG_Configuration(uint16_t ms)
- {
- IWDG_WriteAccessCmd(IWDG_WriteAccess_Enable);
- IWDG_SetPrescaler(IWDG_Prescaler_256);// 256 min:8ms max:32768ms
- IWDG_SetReload(ms); // ms
- IWDG_Enable();
-
- }
-
- void IWDG_feed()
- {
- IWDG_ReloadCounter(); // ms
- }
|