Motion_EC_Stm32_archived/Core/Src/iwdg.c

48 lines
1.3 KiB
C
Raw Normal View History

2020-02-20 11:42:50 +08:00
/**
******************************************************************************
* @file iwdg.c
* @brief This file provides code for the configuration
* of the IWDG instances.
2020-02-20 11:42:50 +08:00
******************************************************************************
* @attention
*
* <h2><center>&copy; Copyright (c) 2020 STMicroelectronics.
* All rights reserved.</center></h2>
*
2020-02-20 12:38:58 +08:00
* This software component is licensed by ST under Ultimate Liberty license
* SLA0044, the "License"; You may not use this file except in compliance with
* the License. You may obtain a copy of the License at:
* www.st.com/SLA0044
2020-02-20 11:42:50 +08:00
*
******************************************************************************
*/
/* Includes ------------------------------------------------------------------*/
2020-02-20 12:38:58 +08:00
#include "iwdg.h"
2020-02-20 11:42:50 +08:00
/* USER CODE BEGIN 0 */
2020-04-14 17:27:52 +08:00
//PreScaler=16 Reload=0xfff =====> Overflow Time=1.683S
2020-02-20 11:42:50 +08:00
/* USER CODE END 0 */
2020-02-20 12:38:58 +08:00
IWDG_HandleTypeDef hiwdg;
/* IWDG init function */
void MX_IWDG_Init(void)
2020-02-20 11:42:50 +08:00
{
2020-02-20 12:38:58 +08:00
hiwdg.Instance = IWDG;
2020-04-14 18:48:32 +08:00
hiwdg.Init.Prescaler = IWDG_PRESCALER_16;
2020-04-10 19:05:38 +08:00
hiwdg.Init.Reload = 0xfff;
2020-02-20 12:38:58 +08:00
if (HAL_IWDG_Init(&hiwdg) != HAL_OK)
{
Error_Handler();
}
2020-02-20 11:42:50 +08:00
}
/* USER CODE BEGIN 1 */
/* USER CODE END 1 */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/