LoginSignup
0
0

More than 5 years have passed since last update.

Zybo > Chronicles blog 16 > watchdog使用例

Last updated at Posted at 2016-05-18

MicroZed Chronicles リスト http://adiuvoengineering.com/?page_id=285
@ Adam Taylor blog
https://forums.xilinx.com/t5/Xcell-Daily-Blog/The-Zynq-SoC-s-Private-Watchdog-Adam-Taylor-s-MicroZed/ba-p/405273

watchdogを使う処理の主な部分。

#include "xscuwdt.h"

//define private watchdog
#define WDT_DEVICE_ID         XPAR_SCUWDT_0_DEVICE_ID
#define INTC_DEVICE_ID        XPAR_SCUGIC_SINGLE_DEVICE_ID
#define WDT_IRPT_INTR         XPAR_SCUWDT_INTR
#define WDT_LOAD_VALUE        0xFF

//watchdog configuration
WCHConfigPtr = XScuWdt_LookupConfig(WDT_DEVICE_ID);
XScuWdt_CfgInitialize(&WdtInstance, WCHConfigPtr,WCHConfigPtr->BaseAddr);
XScuWdt_LoadWdt(&WdtInstance, WDT_LOAD_VALUE);
XScuWdt_Start(&WdtInstance);

//set up the watchdog
XScuGic_Connect(GicInstancePtr, WdtIntrId,(Xil_ExceptionHandler)WdtIntrHandler,
(void *)WdtInstancePtr);

//setup the watchdog
XScuWdt_SetWdMode(WdtInstancePtr);

// 
XScuWdt_SetTimerMode()

//
XScuWdt_IsWdtExpired(InstancePtr)

動作するソースコードはブログに掲載されている。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0