-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fixed amb build errors. Added iwdg. * removed startup folder in amb
- Loading branch information
Showing
9 changed files
with
915 additions
and
482 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/* USER CODE BEGIN Header */ | ||
/** | ||
****************************************************************************** | ||
* @file iwdg.h | ||
* @brief This file contains all the function prototypes for | ||
* the iwdg.c file | ||
****************************************************************************** | ||
* @attention | ||
* | ||
* Copyright (c) 2024 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 */ | ||
/* Define to prevent recursive inclusion -------------------------------------*/ | ||
#ifndef __IWDG_H__ | ||
#define __IWDG_H__ | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
/* Includes ------------------------------------------------------------------*/ | ||
#include "main.h" | ||
|
||
/* USER CODE BEGIN Includes */ | ||
|
||
/* USER CODE END Includes */ | ||
|
||
extern IWDG_HandleTypeDef hiwdg; | ||
|
||
/* USER CODE BEGIN Private defines */ | ||
|
||
/* USER CODE END Private defines */ | ||
|
||
void MX_IWDG_Init(void); | ||
|
||
/* USER CODE BEGIN Prototypes */ | ||
|
||
/* USER CODE END Prototypes */ | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#endif /* __IWDG_H__ */ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
/* USER CODE BEGIN Header */ | ||
/** | ||
****************************************************************************** | ||
* @file iwdg.c | ||
* @brief This file provides code for the configuration | ||
* of the IWDG instances. | ||
****************************************************************************** | ||
* @attention | ||
* | ||
* Copyright (c) 2024 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_HandleTypeDef hiwdg; | ||
|
||
/* IWDG init function */ | ||
void MX_IWDG_Init(void) | ||
{ | ||
|
||
/* USER CODE BEGIN IWDG_Init 0 */ | ||
#ifdef DEBUG | ||
return; // Skip IWDG initialization in debug mode | ||
#endif | ||
/* USER CODE END IWDG_Init 0 */ | ||
|
||
/* USER CODE BEGIN IWDG_Init 1 */ | ||
|
||
/* USER CODE END IWDG_Init 1 */ | ||
hiwdg.Instance = IWDG; | ||
hiwdg.Init.Prescaler = IWDG_PRESCALER_8; | ||
hiwdg.Init.Reload = 4095; | ||
if (HAL_IWDG_Init(&hiwdg) != HAL_OK) | ||
{ | ||
Error_Handler(); | ||
} | ||
/* USER CODE BEGIN IWDG_Init 2 */ | ||
|
||
/* USER CODE END IWDG_Init 2 */ | ||
|
||
} | ||
|
||
/* USER CODE BEGIN 1 */ | ||
|
||
/* USER CODE END 1 */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.