| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- /* USER CODE BEGIN Header */
- /**
- ******************************************************************************
- * @file iwdg.c
- * @brief This file provides code for the configuration
- * of the IWDG instances.
- ******************************************************************************
- * @attention
- *
- * Copyright (c) 2026 STMicroelectronics.
- * All rights reserved.
- *
- * This software is licensed under terms that can be found in the LICENSE file
- * in the root directory of this software component.
- * If no LICENSE file comes with this software, it is provided AS-IS.
- *
- ******************************************************************************
- */
- /* USER CODE END Header */
- /* Includes ------------------------------------------------------------------*/
- #include "iwdg.h"
- /* USER CODE BEGIN 0 */
- #include "App_guardian.h"
- /* USER CODE END 0 */
- IWDG_HandleTypeDef hiwdg1;
- /* IWDG1 init function */
- void MX_IWDG1_Init(void)
- {
- /* USER CODE BEGIN IWDG1_Init 0 */
- #if !GUARD_ENABLE
- return; /* 守护关闭: IWDG 从未启动 (启动后无法关闭, 只能复位) */
- #endif
- /* USER CODE END IWDG1_Init 0 */
- /* USER CODE BEGIN IWDG1_Init 1 */
- /* USER CODE END IWDG1_Init 1 */
- hiwdg1.Instance = IWDG1;
- hiwdg1.Init.Prescaler = IWDG_PRESCALER_32;
- hiwdg1.Init.Window = 4095;
- hiwdg1.Init.Reload = 3000;
- if (HAL_IWDG_Init(&hiwdg1) != HAL_OK)
- {
- Error_Handler();
- }
- /* USER CODE BEGIN IWDG1_Init 2 */
- /* USER CODE END IWDG1_Init 2 */
- }
- /* USER CODE BEGIN 1 */
- /* USER CODE END 1 */
|