zoukankan      html  css  js  c++  java
  • MKL25-Computer operating properly (COP) watchdog timer

      1、.c文件内容

    /*
     * cop.c
     *
     *  Created on: 2020年8月26日
     *      Author: Mr.W
     */
    
    #include "cop.h"
    
    void cop_init(void)
    {
        cop_config_t configCop = {0};
    
        COP_GetDefaultConfig(&configCop);
        COP_Init(SIM, &configCop);
        COP_Refresh(SIM);
    }
    
    void wdg_feed(void)
    {
        COP_Refresh(SIM);
    }

      2、.h文件内容

    /*
     * cop.h
     *
     *  Created on: 2020年8月26日
     *      Author: Mr.W
     */
    
    #ifndef COP_H_
    #define COP_H_
    
    /***********************************************************************************************************************
     * Included files
     **********************************************************************************************************************/
    #include "fsl_cop.h"
    
    #if defined(__cplusplus)
    extern "C" {
    #endif /* __cplusplus */
    
    /***********************************************************************************************************************
     * Definitions
     **********************************************************************************************************************/
    
    
    /***********************************************************************************************************************
     * Global variables
     **********************************************************************************************************************/
    
    
    /***********************************************************************************************************************
     * Initialization functions
     **********************************************************************************************************************/
    void cop_init(void);
    void wdg_feed(void);
    
    #if defined(__cplusplus)
    }
    #endif
    
    #endif /* COP_H_ */

      3、需要注意事项

      这里一定要不失能看门狗,否则初始化看门狗后不起作用,还有就是在调试模式下内部看门狗是被失能的

      

  • 相关阅读:
    微服务负载均衡技术
    dubbo 协议注册中心
    dubbo 元数据中心
    @Autowired 写在构造方法上
    onchange事件 is not defined
    转:JNDI的本质及作用
    The valid characters are defined in RFC 7230 and RFC 3986报错处理
    FOR XML PATH 简单介绍
    ROW_NUMBER() OVER函数的基本用法
    java和js中JSONObject,JSONArray,Map,String之间转换
  • 原文地址:https://www.cnblogs.com/wenhao-Web/p/13565603.html
Copyright © 2011-2022 走看看