STM8S independent watchdog configuration and use

Publisher:beta12Latest update time:2016-06-07 Source: eefocusKeywords:STM8S Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
//The clock source of the independent gatekeeper is the internal low-speed clock 128khz divided by 2, which is 64khz

//Select IWDG_Prescaler_128
//64/128 = 0.5 khz 2ms period
 

#define  IWDG_500MS_REST  (uint8)250
#define  IWDG_400MS_REST  (uint8)200
#define  IWDG_300MS_REST  (uint8)150
#define  IWDG_250MS_REST  (uint8)125
#define  IWDG_200MS_REST  (uint8)100
#define  IWDG_100MS_REST  (uint8)50
#define  IWDG_50MS_REST   (uint8)25
#define  IWDG_4MS_REST    (uint8)2


  IWDG_WriteAccessCmd(IWDG_WriteAccess_Enable); //Agree to operate independent watchdog
  IWDG_SetPrescaler(IWDG_Prescaler_128); //Watchdog prescaler
  IWDG_SetReload(IWDG_200MS_REST); //Set the watchdog reset time
  IWDG_Enable(); //Start independent watchdog

  IWDG_ReloadCounter(); //Watchdog reset If you don't want watchdog reset to occur during normal use, run

This instruction

Keywords:STM8S Reference address:STM8S independent watchdog configuration and use

Previous article:Serial communication between two microcontrollers
Next article:Independent watchdog and window watchdog of stm8

Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号