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的更多相关文章

  1. learning uboot support web http function in qca4531 cpu

    reference :https://forum.openwrt.org/viewtopic.php?id=43237 reference :http://blog.chinaunix.net/uid ...

  2. learning uboot auto switch to stanbdy system in qca4531 cpu

    design: when uboot load kerne failed,we can switch to stanbdy system; how to realize: when boot fail ...

  3. learning uboot enable protect console

    reference :https://github.com/lentinj/u-boot/blob/master/doc/README.autoboot how to enable protect s ...

  4. learning uboot how to set ddr parameter in qca4531 cpu

    DDR工作频率  在600MHZ. include/configs/board953x.h #define CFG_PLL_FREQ            CFG_PLL_650_600_200 #d ...

  5. learning uboot test command

    uboot commad test test - minimal test like /bin/sh so we can use test command to some judge for exam ...

  6. learning uboot distro design in am335x-evm board

    reference: uboot_dir/doc/README.distro Linux distributions are faced with supporting a variety of bo ...

  7. learning uboot switch to standby system using button

    pseudocode: If(reset_button was pressed ) { Change  uboot env bootslot^1 }

  8. learning uboot source command

    reference: http://www.denx.de/wiki/DULG/UBootCmdGroupExec => help source source - run script from ...

  9. learning uboot fstype command

    => fstypefstype - Look up a filesystem type Usage:fstype <interface> <dev>:<part&g ...

随机推荐

  1. STM32.printf

    printf("\r\n this is a usart printf demo \r\n"); Use Micro LIB 需要勾选这个库 将串口定义成 printf 函数 #i ...

  2. Entity Framework 6 和 MVC5

    网站地址: Entity  Framework 6   http://msdn.microsoft.com/en-us/data/ef.aspx MVC5     http://www.asp.net ...

  3. Python3基础 try-except else进行配合

             Python : 3.7.0          OS : Ubuntu 18.04.1 LTS         IDE : PyCharm 2018.2.4       Conda ...

  4. Git项目创建与提交

    创建Git密钥: 1.生成密钥: 右键–>Git Bash Here:先输入ssh-keygen –t rsa –C "邮箱地址",注意ssh-keygen之间是没有空格的, ...

  5. zedgraph多个graphpane的处理

    这个问题需要研究,需要使用  zedgraph.masterpane.panelist 其他人做的效果--先预留一个官网的链接http://zedgraph.dariowiz.com/index113 ...

  6. 解决“centos 下bash: g++: 未找到命令...”

    简单测试一个C++的“Hello World”,发现报错:“bash: g++: 未找到命令...”,因为没有安装编译器G++:然后就百度,出现一大堆的解决办法,什么“sudo apt-get ins ...

  7. Jsp基础语法(由简入杂)

    JSP基础语法 一,JSP简介 Jsp是一个简化的Servlet设计,是在服务器端执行,他实现了再Java中使用HTML标签. Jsp是一种动态网页技术标准也是JAVAEE的标准 二,常见动态网站开发 ...

  8. 正则表达式中 (?=pattern) (?!pattern) (?<=pattern) (?<!pattern) 的使用

    2018-08-06 12:33:58 StackOverFlow上有个如下的问题: 这里就会用到正向肯定预查(?=pattern):

  9. TCP三次握手(待细研究)

    xu言: 看到一张不错清晰的Tcp三次握手图,收藏 Initiator  发起人 Receiver  接收者 LISTENING 状态xx服务启动后首先处于侦听(LISTENING)状态. ESTAB ...

  10. Android设置全局Context

    新建一个java继承Application类 import android.app.Application; import android.content.Context; /** * 编写自定义Ap ...