stm32f103 window watchdog

Publisher:cxx7848653Latest update time:2016-06-07 Source: eefocusKeywords:stm32f103 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
stm32 has two watchdogs: an independent watchdog that can reset the CPU when a hardware failure is detected, and a window watchdog that can reset the CPU when a software failure is detected.

I use a window watchdog in my program, which has two window values: the upper window value can be configured by the bottom seven bits of the WWDG->CFR register, and the lower window value is fixed at 0x40. The bottom seven bits of WWDG_CR are the count value of the watchdog.

When count is updated outside the window value or the count value is less than 0x40, the window watchdog resets the CPU. Here are some points to note: 1. The delay function feeds the dog as follows

 

   for(i=0;i<1000;i++){ 
delayms(1);
FEED_DOG;
2. When debugging, add the code to light up the lamp at the beginning of the main function: first check whether the lamp goes out when the reset button is pressed. Sometimes the CPU does not work, but the lamp is still on. In this way, you don't know whether the dog has been reset.

 

Relevant debugging information can be printed through the serial port.

Keywords:stm32f103 Reference address:stm32f103 window watchdog

Previous article:stm32F4 series MCU, bug in window watchdog WWDG
Next article:CortexM3 (NXP LPC1788) WDT Window Watchdog Timer

Recommended ReadingLatest update time:2024-11-16 14:27

STM32f103 watchdog usage
//Watchdog timeout needs to be calculated // AGAIN 7.1 #ifndef __STM32_WDG_H__ #include "stm32f10x.h" #define LSI_FREQ   40000 void stm32_wdg_init(void); void stm32_wdg_enable(void); void stm32_wdg_feed(void); #endif #include "stm32_wdg.h" #include "stm32f10x_iwdg.h" void stm32_wdg_init(void) {     /*Enables write acc
[Microcontroller]
Design of short-range wireless data transmission system based on STM32F103 and nRF24L01
In recent years, with the development of wireless communication technology, the integration of wireless communication equipment has become increasingly high. This paper introduces a specific method of designing a short-distance wireless data transmission system using a high-performance, low-power 32-bit microprocess
[Microcontroller]
Design of short-range wireless data transmission system based on STM32F103 and nRF24L01
Trying to use STM32f103c8t6 as USBCDC
I tinkered with stm32 when I was bored. There were too many resources in the lab to handle. I worked on dsp and fpga a few days ago, but found these chips a bit boring, so I came back to work on stm32. I worked on it for a day. In the afternoon, I made a FreeRTOS example. After reading some information, I found it was
[Microcontroller]
STM32F103 Slave I2C Configuration
I have just started to work on STM32 development. Due to project requirements, the Linux system needs to communicate with STM32 through I2C. There is limited suitable information on the Internet, and it took me a lot of time, so I record it here. Description: After Linux sends data, it polls stm32 every 10ms (it sho
[Microcontroller]
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
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号