STM8 watchdog configuration pit

Publisher:TranquilVibesLatest update time:2020-10-09 Source: eefocusKeywords:STM8 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

First of all, the correct way to open it.


void IWDG_Init(void) //Configure and start the watchdog

    IWDG->KR = 0xcc; //Start independent watchdog  

    IWDG->KR = 0x55; //Write unlock  

    IWDG->PR = 0x06; //256 division

    IWDG->RLR = 0xff; //Set reload register

    IWDG->KR = 0xaa; //Lock and refresh

}

void IWDG_Feed(void) // Feed the dog

{  

    IWDG->KR = 0xaa;

}  


Keywords:STM8 Reference address:STM8 watchdog configuration pit

Previous article:Supplement of creating a new project in IAR
Next article:STM8 Hardware Design Considerations

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号