You've already forked M5Module-Fan-Internal-FW
mirror of
https://github.com/m5stack/M5Module-Fan-Internal-FW.git
synced 2026-05-20 11:36:51 -07:00
53 lines
1.4 KiB
C
53 lines
1.4 KiB
C
/* USER CODE BEGIN Header */
|
|
/**
|
|
******************************************************************************
|
|
* @file iwdg.c
|
|
* @brief This file provides code for the configuration
|
|
* of the IWDG instances.
|
|
******************************************************************************
|
|
* @attention
|
|
*
|
|
* Copyright (c) 2025 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 */
|
|
|
|
/* USER CODE END 0 */
|
|
|
|
/* IWDG init function */
|
|
void MX_IWDG_Init(void)
|
|
{
|
|
/* USER CODE BEGIN IWDG_Init 0 */
|
|
|
|
/* USER CODE END IWDG_Init 0 */
|
|
|
|
/* USER CODE BEGIN IWDG_Init 1 */
|
|
|
|
/* USER CODE END IWDG_Init 1 */
|
|
LL_IWDG_Enable(IWDG);
|
|
LL_IWDG_EnableWriteAccess(IWDG);
|
|
LL_IWDG_SetPrescaler(IWDG, LL_IWDG_PRESCALER_16);
|
|
LL_IWDG_SetReloadCounter(IWDG, 4095);
|
|
while (LL_IWDG_IsReady(IWDG) != 1) {
|
|
}
|
|
|
|
LL_IWDG_ReloadCounter(IWDG);
|
|
/* USER CODE BEGIN IWDG_Init 2 */
|
|
|
|
/* USER CODE END IWDG_Init 2 */
|
|
}
|
|
|
|
/* USER CODE BEGIN 1 */
|
|
|
|
/* USER CODE END 1 */
|