基质喷涂
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

54 lines
1.3 KiB

  1. /* USER CODE BEGIN Header */
  2. /**
  3. ******************************************************************************
  4. * @file iwdg.c
  5. * @brief This file provides code for the configuration
  6. * of the IWDG instances.
  7. ******************************************************************************
  8. * @attention
  9. *
  10. * Copyright (c) 2025 STMicroelectronics.
  11. * All rights reserved.
  12. *
  13. * This software is licensed under terms that can be found in the LICENSE file
  14. * in the root directory of this software component.
  15. * If no LICENSE file comes with this software, it is provided AS-IS.
  16. *
  17. ******************************************************************************
  18. */
  19. /* USER CODE END Header */
  20. /* Includes ------------------------------------------------------------------*/
  21. #include "iwdg.h"
  22. /* USER CODE BEGIN 0 */
  23. /* USER CODE END 0 */
  24. IWDG_HandleTypeDef hiwdg;
  25. /* IWDG init function */
  26. void MX_IWDG_Init(void)
  27. {
  28. /* USER CODE BEGIN IWDG_Init 0 */
  29. /* USER CODE END IWDG_Init 0 */
  30. /* USER CODE BEGIN IWDG_Init 1 */
  31. /* USER CODE END IWDG_Init 1 */
  32. hiwdg.Instance = IWDG;
  33. hiwdg.Init.Prescaler = IWDG_PRESCALER_256;
  34. hiwdg.Init.Reload = 2500;
  35. if (HAL_IWDG_Init(&hiwdg) != HAL_OK)
  36. {
  37. Error_Handler();
  38. }
  39. /* USER CODE BEGIN IWDG_Init 2 */
  40. /* USER CODE END IWDG_Init 2 */
  41. }
  42. /* USER CODE BEGIN 1 */
  43. /* USER CODE END 1 */