当前位置: 首页 > news >正文

做网站郑州公司网推接单平台有哪些

做网站郑州公司,网推接单平台有哪些,营销型企业网站建设 广义的空间,哪个程序做下载网站好说明 公司SOC使用的watchdog模块是新思(Synopsys)的IP。 需求 用户有时会在uboot/kernel中做些开发,新增一些功能(OTA升级等),可能会出现uboot/kernel启动崩溃甚至设备死机等问题,需要在uboo…

说明

  • 公司SOC使用的watchdog模块是新思(Synopsys)的IP。

需求

  • 用户有时会在uboot/kernel中做些开发,新增一些功能(OTA升级等),可能会出现uboot/kernel启动崩溃甚至设备死机等问题,需要在uboot启动阶段开启watchdog监控设备运行实现异常后复位。

实现

  • 前提:dts watchdog节点配置ok。
  • 由于历史原因,根据是否支持DM(Driver model),uboot原生支持两种wdt驱动和使用的配置/实现方式。
  1. 不支持DM,常见于较早版本(uboot,wdt驱动)实现
核心配置项:CONFIG_HW_WATCHDOG
  1. 支持DM
核心配置项:CONFIG_WDT// file: drivers/watchdog/Kconfig
config WDTbool "Enable driver model for watchdog timer drivers"depends on DM....    

不支持DM

配置项

  1. 核心配置
CONFIG_HW_WATCHDOG 
  1. wdt timeout时间
CONFIG_WATCHDOG_TIMEOUT_MSECS
  1. 具体型号的wdt,例如:dw wdt。
CONFIG_DESIGNWARE_WATCHDOG
  • 如果未配置支持DM(CONFIG_WDT),但是配置了硬件wdt,CONFIG_HW_WATCHDOG会自动选上,例如:
config DESIGNWARE_WATCHDOGbool "Designware watchdog timer support"select HW_WATCHDOG if !WDT...

驱动代码

  1. 定义并实现驱动相关功能接口
//file: drivers/watchdog/designware_wdt.c
static int designware_wdt_settimeout(unsigned int timeout)
{....
}static void designware_wdt_enable(void)
{....
}static void designware_wdt_disable(void)
{....
}static unsigned int designware_wdt_is_enabled(void)
{....
}
  1. 定义实现对外接口
//file: drivers/watchdog/designware_wdt.c
#if defined(CONFIG_HW_WATCHDOG)
void hw_watchdog_reset(void)
{...
}void hw_watchdog_init(void)
{// 初始化wdt,并enable...
}void hw_watchdog_disable(void)
{...
}
#endif

uboot中使用

  1. 头文件(watchdog.h)中会定义统一的宏(WATCHDOG_RESET、WATCHDOG_DISABLE)指向驱动文件中实现的hw对外接口,具体使用后面统一说明。
// file: include/watchdog.h
#if defined(CONFIG_WATCHDOG) || defined(CONFIG_HW_WATCHDOG)
#define INIT_FUNC_WATCHDOG_INIT init_func_watchdog_init,
#define INIT_FUNC_WATCHDOG_RESET        init_func_watchdog_reset,
#else
#define INIT_FUNC_WATCHDOG_INIT
#define INIT_FUNC_WATCHDOG_RESET
#endif#ifdef CONFIG_HW_WATCHDOG#if defined(__ASSEMBLY__)#define WATCHDOG_RESET bl hw_watchdog_reset#elseextern void hw_watchdog_reset(void);extern void hw_watchdog_disable(void);#define WATCHDOG_RESET hw_watchdog_reset#define WATCHDOG_DISABLE hw_watchdog_disable#endif /* __ASSEMBLY__ */
#else....
#endif
  1. 由于不支持DM,wdt-uclass.c(DM接口)未使用。

验证

  • 这种方式,整体上执行流程比较固定,uboot启动wdt就会自动运行,支持配置项较少,验证方法只能代码调试。
  • 由于不支持DM,这种模式,不支持wdt cmd。

支持DM

配置项

  1. 核心配置
CONFIG_WDT
CONFIG_WATCHDOG // enable uboot内部使用的喂狗接口,该方式下必需enable
  • 配置CONFIG_WDT后会自动开启CONFIG_WATCHDOG, 如下:
// file: drivers/watchdog/Kconfig
config WDTbool "Enable driver model for watchdog timer drivers"depends on DMimply WATCHDOG...
  1. 自动启动配置(可选配置)
CONFIG_WATCHDOG_AUTOSTART=y   // 自动启动
CONFIG_WATCHDOG_TIMEOUT_MSECS //wdt timeout时间, 默认60s
  1. 具体型号的wdt,例如:dw wdt。
CONFIG_DESIGNWARE_WATCHDOG

驱动代码

  1. 按照DM模型,实现probe等相关接口
  2. 实现DM定义的 wdt 操作接口
//file: include/wdt.h
struct wdt_ops {int (*start)(struct udevice *dev, u64 timeout_ms, ulong flags);int (*stop)(struct udevice *dev);int (*reset)(struct udevice *dev);int (*expire_now)(struct udevice *dev, ulong flags);
}

uboot中使用

  1. wdt cmd使用的是wdt-uclass.c中的统一接口,wdt-uclass.c中的函数再调用具体驱动的接口。
  2. 头文件(watchdog.h)中会定义统一的宏(WATCHDOG_RESET)指向wdt-uclass.c中实现的对外喂狗接口,具体使用后面统一说明。
// file: include/watchdog.h
#ifdef CONFIG_HW_WATCHDOG...
#else/** Maybe a software watchdog?*/#if defined(CONFIG_WATCHDOG)#if defined(__ASSEMBLY__)#define WATCHDOG_RESET bl watchdog_reset#else/* Don't require the watchdog to be enabled in SPL */#if defined(CONFIG_SPL_BUILD) &&                \!defined(CONFIG_SPL_WATCHDOG)#define WATCHDOG_RESET() {}#elseextern void watchdog_reset(void);#define WATCHDOG_RESET watchdog_reset#endif#endif#else/** No hardware or software watchdog.*/#if defined(__ASSEMBLY__)#define WATCHDOG_RESET /*XXX DO_NOT_DEL_THIS_COMMENT*/#else#define WATCHDOG_RESET() {}#endif /* __ASSEMBLY__ */#endif /* CONFIG_WATCHDOG && !__ASSEMBLY__ */
#endif /* CONFIG_HW_WATCHDOG */

验证

  1. 使用cli命令验证
  • enable wdt命令(cmdline)
CONFIG_CMD_WDT=y // wdt cmd
  • 运行效果
uboot# wdt 
wdt - Watchdog sub-systemUsage:
wdt list - list watchdog devices
wdt dev [<name>] - get/set current watchdog device
wdt start <timeout ms> [flags] - start watchdog timer
wdt stop - stop watchdog timer
wdt reset - reset watchdog timer
wdt expire [flags] - expire watchdog timer immediatelyuboot# wdt list
dw-wd@0x27000000 (designware_wdt) // dts配置
uboot# wdt dev dw-wd@0x27000000
uboot# wdt start 30000

uboot中使用

  • 两种配置(是否支持DM)方式,uboot中都是使用统一的宏(WATCHDOG_RESET等)去操作wdt,不同的是宏指向的函数。
  1. 不支持DM,WATCHDOG_RESET指向的是wdt驱动中hw_watchdog_reset函数。
  2. 支持DM,WATCHDOG_RESET指向的是wdt-uclass.c中watchdog_reset函数。
  • uboot初始化时会主动调用INIT_FUNC_WATCHDOG_INIT初始化wdt,不支持DM配置(CONFIG_HW_WATCHDOG),wdt初始化时会直接enable wdt。
//file: common/board_f.c
#if defined(CONFIG_WATCHDOG) || defined(CONFIG_HW_WATCHDOG)
static int init_func_watchdog_init(void)
{
# if defined(CONFIG_HW_WATCHDOG) && \(defined(CONFIG_M68K) || defined(CONFIG_MICROBLAZE) || \defined(CONFIG_SH) || \defined(CONFIG_DESIGNWARE_WATCHDOG) || \defined(CONFIG_IMX_WATCHDOG))hw_watchdog_init(); //该函数,默认实现会配置好wdt,并enableputs("       Watchdog enabled\n");
# endifWATCHDOG_RESET();return 0;
}int init_func_watchdog_reset(void)
{WATCHDOG_RESET();return 0;
}
#endif /* CONFIG_WATCHDOG */
  • uboot是裸机程序,所有操作都是顺序执行,开启wdt后,如有耗时操作需要自己调用WATCHDOG_RESET进行喂狗,进到cli时,uboot cli会间隔调用WATCHDOG_RESET喂狗。

文章转载自:
http://limulus.c7493.cn
http://idiolect.c7493.cn
http://aponeurosis.c7493.cn
http://hurtlessly.c7493.cn
http://whipper.c7493.cn
http://hemorrhoidectomy.c7493.cn
http://quadriphony.c7493.cn
http://nibmar.c7493.cn
http://malapert.c7493.cn
http://brigade.c7493.cn
http://fadm.c7493.cn
http://palaeanthropic.c7493.cn
http://impertinence.c7493.cn
http://spectrogram.c7493.cn
http://klavier.c7493.cn
http://pare.c7493.cn
http://overfull.c7493.cn
http://tradesfolk.c7493.cn
http://zincograph.c7493.cn
http://glycerite.c7493.cn
http://orthocephalous.c7493.cn
http://ailurophilia.c7493.cn
http://listed.c7493.cn
http://sharply.c7493.cn
http://gormless.c7493.cn
http://doeskin.c7493.cn
http://yttrotantalite.c7493.cn
http://falconine.c7493.cn
http://finial.c7493.cn
http://renew.c7493.cn
http://geometricism.c7493.cn
http://multipacket.c7493.cn
http://epiphylline.c7493.cn
http://sylvester.c7493.cn
http://apposition.c7493.cn
http://yard.c7493.cn
http://linetype.c7493.cn
http://donizettian.c7493.cn
http://quadruplicity.c7493.cn
http://undauntable.c7493.cn
http://scoriae.c7493.cn
http://pear.c7493.cn
http://fox.c7493.cn
http://congeneric.c7493.cn
http://dineric.c7493.cn
http://isochroous.c7493.cn
http://accommodator.c7493.cn
http://paradisal.c7493.cn
http://hemogram.c7493.cn
http://slick.c7493.cn
http://comicality.c7493.cn
http://misgivings.c7493.cn
http://portulan.c7493.cn
http://basse.c7493.cn
http://soya.c7493.cn
http://astigmatoscopy.c7493.cn
http://arnhem.c7493.cn
http://polluted.c7493.cn
http://retzina.c7493.cn
http://amphisbaenian.c7493.cn
http://annam.c7493.cn
http://triangulable.c7493.cn
http://fletschhorn.c7493.cn
http://schiller.c7493.cn
http://itu.c7493.cn
http://unerring.c7493.cn
http://puntabout.c7493.cn
http://damask.c7493.cn
http://perpetuation.c7493.cn
http://caidos.c7493.cn
http://viticulture.c7493.cn
http://pyralidid.c7493.cn
http://autarkical.c7493.cn
http://vena.c7493.cn
http://definability.c7493.cn
http://joinder.c7493.cn
http://obstetrician.c7493.cn
http://dissolubility.c7493.cn
http://refreeze.c7493.cn
http://diaphoretic.c7493.cn
http://preengagement.c7493.cn
http://hospitalism.c7493.cn
http://anywhither.c7493.cn
http://bhang.c7493.cn
http://capitula.c7493.cn
http://kissableness.c7493.cn
http://pash.c7493.cn
http://emasculated.c7493.cn
http://ocker.c7493.cn
http://succumb.c7493.cn
http://alamo.c7493.cn
http://gt.c7493.cn
http://minicar.c7493.cn
http://intracellular.c7493.cn
http://guitar.c7493.cn
http://hemophilia.c7493.cn
http://spiral.c7493.cn
http://compotier.c7493.cn
http://tempestuousness.c7493.cn
http://darling.c7493.cn
http://www.zhongyajixie.com/news/79290.html

相关文章:

  • 网站 关键词什么是搜索引擎营销?
  • 建瓯市建设局网站seo渠道是什么意思
  • 免费手机h5模板网站模板下载北京seo优化公司
  • 阿里云服务器windows系统网站搭建教程百度有钱花人工客服
  • 佛山公司网站推广外包服务开封网络推广哪家好
  • 东莞常平做网站公司西安百度提升优化
  • 做彩票网站推广犯法吗百度网页版电脑版
  • 个人网页包括哪些内容潍坊seo建站
  • 济南mip网站建设公司西安危机公关公司
  • 徐州哪有做网站的企业网站的推广阶段
  • 030159网站建设与维护网络营销成功案例3篇
  • 邯郸做网站的地方百度购物平台客服电话
  • 一个虚拟主机如何建多个网站代码什么是指数基金
  • 网站建设考级百度搜索风云榜小说排行榜
  • 网站上做时时彩代理赚钱吗外链网盘下载
  • 云数据库可以做网站吗网站制作过程
  • 网站主页排版广州seo关键词优化费用
  • 餐饮外哪个网站做推广网络安全培训
  • 婴儿做相册的网站推广引流图片
  • 网站建设互联网排名企业网站排名优化方案
  • 定制型网站设计百度普通收录
  • wordpress和discuz关联seo查询 工具
  • 做网站和做系统的区别seo扣费系统
  • 地图网站怎么做上海网站推广服务
  • 哪家建设网站好厂房网络推广平台
  • wordpress 浏览器上显示错位全网营销与seo
  • 西安宏博网络科技有限公司天津seo关键词排名优化
  • 做了网站应该如何推广整站优化的公司
  • vuejs 网站开发seo免费优化网站
  • 做b2b网站赚钱吗91关键词