女人被狂躁到高潮视频免费无遮挡,内射人妻骚骚骚,免费人成小说在线观看网站,九九影院午夜理论片少妇,免费av永久免费网址

當前位置:首頁 > 單片機 > 單片機
[導讀]  Watchdog is a very necessary module for embedded system. Someone said that embedded system operates without watchdog enabled just like the car without air bag. You should always enabled watchdog a

  Watchdog is a very necessary module for embedded system. Someone said that embedded system operates without watchdog enabled just like the car without air bag. You should always enabled watchdog as possible as you can.


  The PIC32MZ Watchdog Timer (WDT), when enabled, operates from the internal Low-Power RC (LPRC) Oscillator clock source which is 32.768 KHz. The WDT can be used to detect system software malfunctions by resetting the device if the WST is not cleared periodically in software. The WDT can be configured in Windowed mode or non-Windowed mode. Various WDT time-out periods can be selected using the WDT postscaler. The WDT can also be used to wake the device from Sleep or Idle mode.


  At the moment, I implement the primary function of the WDT is to reset the processor in the event of a software malfunction. I enable WDT with Non-Windowed mode, and the WDT will increment until it overflows or "times out". A WDT time-out will force a device Reset, except during Sleep or Idle modes. To prevent a WDT time-out Reset, my application always periodically clear the WDT by writing a key word 0x5743 to the WDTCLEKEY (WDTCON<31:16>) through a single 16-bit write (for some other devices, or by setting the WDTCLR (WDTCON<0>).


  The WDT is enabled or disabled by the device configuration bits or controlled through software by writing to the WDTCON register. In my application I just set the device configuration bits like below.


#pragma config WDTPS = PS32 // Watchdog Timer Postscaler (1:32)

#pragma config WDTSPGM = STOP // Watchdog Timer Stop During Flash Programming (WDT stops during Flash programming)

#pragma config WINDIS = NORMAL // Watchdog Timer Window Mode (Watchdog Timer is in non-Window mode)

#pragma config FWDTEN = OFF // Watchdog Timer Enable (WDT Disabled)

#pragma config FWDTWINSZ = WINSZ_25 // Watchdog Timer Window Size (Window size is 25%)

  The setting as above, the postscaler of Watchdog Timer is 32. It determines the period of Watchdog Timer overflow is 32ms. The FWDTEN Configuration bit is clear, so I need enable Watchdog Timer by software, and I also need a function to clear Watchdog and call this function periodically in the main loop. Below is my implementation of them.


  


void Wdt_Init(void)

{

WDTCONSET = 0x8000;

}


void Wdt_Refresh(void)

{

unsigned short *pWdtClear = (unsigned short *)0xBF800800 + 1;

*pWdtClear = 0x5743;

}


本站聲明: 本文章由作者或相關機構(gòu)授權發(fā)布,目的在于傳遞更多信息,并不代表本站贊同其觀點,本站亦不保證或承諾內(nèi)容真實性等。需要轉(zhuǎn)載請聯(lián)系該專欄作者,如若文章內(nèi)容侵犯您的權益,請及時聯(lián)系本站刪除。
換一批
延伸閱讀

Microchip公司的PIC32MZ EF系列是高達250MHz的集成浮點單元(FPU),具有廣泛的外設和包括局域網(wǎng)(CAN)的極好的連接選擇,工作電壓2.1V到 3.6V,DSP增強核具有四

關鍵字: Microchip pic32mz 處理器

使用的是STM32F407的板子,程序參考的是STM32F4xx固件庫的DAC_SignalsGeneration文件夾下的程序。官方例程分別使用了DAC的禁止生成波(DAC_WaveGeneration_None)的E...

關鍵字: dac dma STM32 timer 輸出正弦波

  An interrupt is an internal or external event that requires quick attention from the controller. The PIC32MZ...

關鍵字: interrupt pic32mz timer tutorial

  In my last post I implement "Key Debounce" with port polling, port polling is not very efficient....

關鍵字: pic32mz tutorial change notification

型號:Watchdog,8XC552關鍵字:Watchdog,87C552單片機,監(jiān)視定時器簡介:介紹了以Philips公司的8XC552單片機為主控芯片開發(fā)的智能配電監(jiān)測儀硬件電路的組成和系統(tǒng)工作原理

關鍵字: Philips watchdog 嵌入式開發(fā)

  In my older blog "PIC32MZ tutorial -- Key Debounce", I shows how to acheive key debounce with port...

關鍵字: interrupt pic32mz tutorial external

本文將介紹看門狗驅(qū)動的實現(xiàn)。目標平臺:TQ2440CPU:s3c2440內(nèi)核版本:2.6.301. 看門狗概述 看門狗其實就是一個定時器,當該定時器溢出前必須對看門狗進行"喂狗“,如果不這樣做,定時器溢出后則將...

關鍵字: s3c2440 watchdog 看門狗

#include #include #include #define uchar unsigned char#define uint unsigned int#define SET_LEDPORT...

關鍵字: watchdog 測試 程序

經(jīng)過千辛萬苦,今天終于完工PIC32MZ EC Starter Kit的ethernet bootloader項目。我將整個項目, 命名為PhnBootloader。它分為兩個部分。第一個部分是PC 端的host程序Ph...

關鍵字: bootloader ethernet pic32mz udp協(xié)議
關閉