/**
  ******************************************************************************
  * @file     IWDG_CFG.c
  * @author   SINOMCU-AE
  * @brief    IWDG config
  *    
  *          This file provides functions to IWDG config.
  *         
  ******************************************************************************
  * @attention 
  *                           DISCLAIMER
  * The present firmware which is for guidance only aims at providing customers
  * with coding information regarding their products in order for them to save
  * time. As a result, SinoMCU shall not be held liable for any direct,indirect
  * or consequential damages with respect to any claims arising from the content 
  * of such firmware and/or the use made by customers of the coding information 
  * contained herein in connection with their products.
  *
  * <h2><center>&copy; Copyright (c) 2021 sinomcu All rights reserved.</center></h2>
  *
  ******************************************************************************
  */
    
#include "IWDG_CFG.h"

/**
  * @brief  WWDG config Function
  * @param  None
  * @retval None
  */
void iwdg_init(void) {
  MS32_IWDG_InitTypeDef IwdgInitStr= {0};
  
  MS32_IWDG_StructInit(&IwdgInitStr);
  IwdgInitStr.Prescaler =MS32_IWDG_PRESCALER_64 ;
  IwdgInitStr.Reload    = IWDG_CNT_USER_1S;
  MS32_IWDG_Init(&IwdgInitStr);                            // init function enable WWDG 

  MS32_IWDG_Refresh();
}

/******************************** END OF FILE *********************************/
