iwdg.c 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /**
  2. ******************************************************************************
  3. * @file iwdg.c
  4. * @brief This file provides code for the configuration
  5. * of the IWDG instances.
  6. ******************************************************************************
  7. * @attention
  8. *
  9. * <h2><center>&copy; Copyright (c) 2022 STMicroelectronics.
  10. * All rights reserved.</center></h2>
  11. *
  12. * This software component is licensed by ST under BSD 3-Clause license,
  13. * the "License"; You may not use this file except in compliance with the
  14. * License. You may obtain a copy of the License at:
  15. * opensource.org/licenses/BSD-3-Clause
  16. *
  17. ******************************************************************************
  18. */
  19. /* Includes ------------------------------------------------------------------*/
  20. #include "iwdg.h"
  21. /* USER CODE BEGIN 0 */
  22. /* USER CODE END 0 */
  23. IWDG_HandleTypeDef hiwdg;
  24. /* IWDG init function */
  25. void MX_IWDG_Init(void)
  26. {
  27. hiwdg.Instance = IWDG;
  28. hiwdg.Init.Prescaler = IWDG_PRESCALER_32;
  29. hiwdg.Init.Reload = 0xfff;
  30. if (HAL_IWDG_Init(&hiwdg) != HAL_OK)
  31. {
  32. Error_Handler();
  33. }
  34. }
  35. /* USER CODE BEGIN 1 */
  36. /* USER CODE END 1 */
  37. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/