learning uboot how to enable watchdog in qca4531 cpu
Posted lianghong881018
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了learning uboot how to enable watchdog in qca4531 cpu相关的知识,希望对你有一定的参考价值。
find cpu datasheet , watchdog relate registers:
0x18060008 watchdong timer control
0x1806000c watchdog timer
we can read and write watchdog register under uboot console:
#mw 0x1806000c 0xffffffff 1
#mw 0x1806000c 0x10000000 1
#mw 0x18060008 0x3 1
#md 0x18060008 1
#md 0x1806000c 1
// init watchdog function
//init watchdog timer
//int watchdon timer control
// watchdog action bit[1:0]
#define No_action 0
#define General_purpose_interrupt 1
#define Non_maskable_interrupt 2
#define Full_chip_reset 3
#define WATCHDOG_TIMER_CONTROL 0x18060008
#define WATCHDOG_TIMER 0x1806000c
void enable_watchdog(){
ath_reg_wr(WATCHDOG_TIMER,0xffffffff);
ath_reg_wr(WATCHDOG_TIMER_CONTROL, Full_chip_reset);
}
void disable_watchdog(){
ath_reg_wr(WATCHDOG_TIMER_CONTROL, No_action);
}
void feed_watchdog(){
ath_reg_wr(WATCHDOG_TIMER,0xffffffff);
}
after we encapsulated watchdog interface; we can enable watchdog in the uboot bootup stage
以上是关于learning uboot how to enable watchdog in qca4531 cpu的主要内容,如果未能解决你的问题,请参考以下文章
Learning How to Actively Learn: A Deep Imitation Learning Approach
Learning How To Learn notes-Coursera
How To Improve Deep Learning Performance