source: trunk/firmware/CubeMX/Src/stm32g0xx_hal_msp.c@ 8

Last change on this file since 8 was 1, checked in by f.jahn, 3 years ago
File size: 2.7 KB
Line 
1/* USER CODE BEGIN Header */
2/**
3 ******************************************************************************
4 * File Name : stm32g0xx_hal_msp.c
5 * Description : This file provides code for the MSP Initialization
6 * and de-Initialization codes.
7 ******************************************************************************
8 * @attention
9 *
10 * <h2><center>&copy; Copyright (c) 2020 STMicroelectronics.
11 * All rights reserved.</center></h2>
12 *
13 * This software component is licensed by ST under BSD 3-Clause license,
14 * the "License"; You may not use this file except in compliance with the
15 * License. You may obtain a copy of the License at:
16 * opensource.org/licenses/BSD-3-Clause
17 *
18 ******************************************************************************
19 */
20/* USER CODE END Header */
21
22/* Includes ------------------------------------------------------------------*/
23#include "main.h"
24/* USER CODE BEGIN Includes */
25
26/* USER CODE END Includes */
27
28/* Private typedef -----------------------------------------------------------*/
29/* USER CODE BEGIN TD */
30
31/* USER CODE END TD */
32
33/* Private define ------------------------------------------------------------*/
34/* USER CODE BEGIN Define */
35
36/* USER CODE END Define */
37
38/* Private macro -------------------------------------------------------------*/
39/* USER CODE BEGIN Macro */
40
41/* USER CODE END Macro */
42
43/* Private variables ---------------------------------------------------------*/
44/* USER CODE BEGIN PV */
45
46/* USER CODE END PV */
47
48/* Private function prototypes -----------------------------------------------*/
49/* USER CODE BEGIN PFP */
50
51/* USER CODE END PFP */
52
53/* External functions --------------------------------------------------------*/
54/* USER CODE BEGIN ExternalFunctions */
55
56/* USER CODE END ExternalFunctions */
57
58/* USER CODE BEGIN 0 */
59
60/* USER CODE END 0 */
61/**
62 * Initializes the Global MSP.
63 */
64void HAL_MspInit(void)
65{
66 /* USER CODE BEGIN MspInit 0 */
67
68 /* USER CODE END MspInit 0 */
69
70 __HAL_RCC_SYSCFG_CLK_ENABLE();
71 __HAL_RCC_PWR_CLK_ENABLE();
72
73 /* System interrupt init*/
74
75 /** Disable the Internal Voltage Reference buffer
76 */
77 HAL_SYSCFG_DisableVREFBUF();
78
79 /** Configure the internal voltage reference buffer high impedance mode
80 */
81 HAL_SYSCFG_VREFBUF_HighImpedanceConfig(SYSCFG_VREFBUF_HIGH_IMPEDANCE_ENABLE);
82
83 /** Disable the internal Pull-Up in Dead Battery pins of UCPD peripheral
84 */
85 HAL_SYSCFG_StrobeDBattpinsConfig(SYSCFG_CFGR1_UCPD1_STROBE | SYSCFG_CFGR1_UCPD2_STROBE);
86
87 /* USER CODE BEGIN MspInit 1 */
88
89 /* USER CODE END MspInit 1 */
90}
91
92/* USER CODE BEGIN 1 */
93
94/* USER CODE END 1 */
Note: See TracBrowser for help on using the repository browser.