#include "hal_data.h"
FSP_CPP_HEADER
void R_BSP_WarmStart(bsp_warm_start_event_t event);
FSP_CPP_FOOTER
#include "bsp_iwdt/bsp_iwdt.h"
#include "led/bsp_led.h"
/*按键中断回调函数*/
void key1_callback(external_irq_callback_args_t *p_args)
{
FSP_PARAMETER_NOT_USED(p_args);
/*按键按下触发中断,进行喂狗操作*/
IWDT_Feed();
}
/*******************************************************************************************************************//**
* main() is generated by the RA Configuration editor and is used to generate threads if an RTOS is used. This function
* is called by main() when no RTOS is used.
**********************************************************************************************************************/
void hal_entry(void)
{
/* TODO: add your own code here */
/*红色LED亮*/
LED1_ON;
/*按键中断初始化*/
g_external_irq_on_icu.open(&key1_ctrl, &key1_cfg);
g_external_irq_on_icu.enable(&key1_ctrl);
/*初始化看门狗*/
IWDT_Init();
while(1)
{
/*这部分应该写需要被WDT监控的程序*/
}
#if BSP_TZ_SECURE_BUILD
/* Enter non-secure code */
R_BSP_NonSecureEnter();
#endif
}
/*******************************************************************************************************************//**
* This function is called at various points during the startup process. This implementation uses the event that is
* called right before main() to set up the pins.
*
* @param[in] event Where at in the start up process the code is currently at
**********************************************************************************************************************/
void R_BSP_WarmStart (bsp_warm_start_event_t event)
{
if (BSP_WARM_START_RESET == event)
{
#if BSP_FEATURE_FLASH_LP_VERSION != 0
/* Enable reading from data flash. */
R_FACI_LP->DFLCTL = 1U;
/* Would normally have to wait tDSTOP(6us) for data flash recovery. Placing the enable here, before clock and
* C runtime initialization, should negate the need for a delay since the initialization will typically take more than 6us. */
#endif
}
if (BSP_WARM_START_POST_C == event)
{
/* C runtime environment and system clocks are setup. */
/* Configure pins. */
R_IOPORT_Open(&g_ioport_ctrl, g_ioport.p_cfg);
}
}
#if BSP_TZ_SECURE_BUILD
BSP_CMSE_NONSECURE_ENTRY void template_nonsecure_callable ();
/* Trustzone Secure Projects require at least one nonsecure callable function in order to build (Remove this if it is not required to build). */
BSP_CMSE_NONSECURE_ENTRY void template_nonsecure_callable ()
{
}
#endif
瑞萨RA2L1实现IWDT独立看门狗定时器驱动(e2 studio开发环境-FSP库驱动)
版权申诉
5星 · 超过95%的资源 180 浏览量
2023-02-24
16:35:49
上传
评论
收藏 38KB ZIP 举报
不脱发的程序猿
- 粉丝: 24w+
- 资源: 5824
最新资源
- Swift语言教程及案例
- 汇编语言教程以及汇编器和伪指令的定义
- global,nonlocal,json和python的类的介绍
- DELL EMC POWEREDGE R440 BIOS 2.10.2 编程器备份
- IMG_20240529_122750.jpg
- 基于Java的职工工资管理系统设计源码 - salary management system
- 张律师〈人民路街道)-2405291432.awb
- Editplus 4GL Progress 高亮配色方案
- 回调函数的定义和应用场景
- meta-llama-3-8b-instruct 的 model-00002-of-00004.safetensors 的3/3
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈