stm32l4xx_hal_msp.c
Go to the documentation of this file.
1 /* USER CODE BEGIN Header */
2 /**
3  ******************************************************************************
4  * @file stm32l4xx_hal_msp.c
5  * @brief This file provides code for the MSP Initialization
6  * and de-Initialization codes.
7  ******************************************************************************
8  * @attention
9  *
10  * <h2><center>&copy; Copyright (c) 2022 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 extern DMA_HandleTypeDef hdma_spi1_rx;
28 
29 extern DMA_HandleTypeDef hdma_spi1_tx;
30 
31 extern DMA_HandleTypeDef hdma_usart2_rx;
32 
33 extern DMA_HandleTypeDef hdma_usart2_tx;
34 
35 /* Private typedef -----------------------------------------------------------*/
36 /* USER CODE BEGIN TD */
37 
38 /* USER CODE END TD */
39 
40 /* Private define ------------------------------------------------------------*/
41 /* USER CODE BEGIN Define */
42 
43 /* USER CODE END Define */
44 
45 /* Private macro -------------------------------------------------------------*/
46 /* USER CODE BEGIN Macro */
47 
48 /* USER CODE END Macro */
49 
50 /* Private variables ---------------------------------------------------------*/
51 /* USER CODE BEGIN PV */
52 
53 /* USER CODE END PV */
54 
55 /* Private function prototypes -----------------------------------------------*/
56 /* USER CODE BEGIN PFP */
57 
58 /* USER CODE END PFP */
59 
60 /* External functions --------------------------------------------------------*/
61 /* USER CODE BEGIN ExternalFunctions */
62 
63 /* USER CODE END ExternalFunctions */
64 
65 /* USER CODE BEGIN 0 */
66 
67 /* USER CODE END 0 */
68 /**
69  * Initializes the Global MSP.
70  */
71 void HAL_MspInit(void)
72 {
73  /* USER CODE BEGIN MspInit 0 */
74 
75  /* USER CODE END MspInit 0 */
76 
77  __HAL_RCC_SYSCFG_CLK_ENABLE();
78  __HAL_RCC_PWR_CLK_ENABLE();
79 
80  /* System interrupt init*/
81 
82  /* USER CODE BEGIN MspInit 1 */
83 
84  /* USER CODE END MspInit 1 */
85 }
86 
87 /**
88 * @brief I2C MSP Initialization
89 * This function configures the hardware resources used in this example
90 * @param hi2c: I2C handle pointer
91 * @retval None
92 */
93 void HAL_I2C_MspInit(I2C_HandleTypeDef* hi2c)
94 {
95  GPIO_InitTypeDef GPIO_InitStruct = {0};
96  RCC_PeriphCLKInitTypeDef PeriphClkInit = {0};
97  if(hi2c->Instance==I2C2)
98  {
99  /* USER CODE BEGIN I2C2_MspInit 0 */
100 
101  /* USER CODE END I2C2_MspInit 0 */
102  /** Initializes the peripherals clock
103  */
104  PeriphClkInit.PeriphClockSelection = RCC_PERIPHCLK_I2C2;
105  PeriphClkInit.I2c2ClockSelection = RCC_I2C2CLKSOURCE_PCLK1;
106  if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInit) != HAL_OK)
107  {
108  Error_Handler();
109  }
110 
111  __HAL_RCC_GPIOB_CLK_ENABLE();
112  /**I2C2 GPIO Configuration
113  PB10 ------> I2C2_SCL
114  PB11 ------> I2C2_SDA
115  */
116  GPIO_InitStruct.Pin = I2C_SCL_Pin|I2C_SDA_Pin;
117  GPIO_InitStruct.Mode = GPIO_MODE_AF_OD;
118  GPIO_InitStruct.Pull = GPIO_PULLUP;
119  GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
120  GPIO_InitStruct.Alternate = GPIO_AF4_I2C2;
121  HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
122 
123  /* Peripheral clock enable */
124  __HAL_RCC_I2C2_CLK_ENABLE();
125  /* I2C2 interrupt Init */
126  HAL_NVIC_SetPriority(I2C2_EV_IRQn, 0, 0);
127  HAL_NVIC_EnableIRQ(I2C2_EV_IRQn);
128  /* USER CODE BEGIN I2C2_MspInit 1 */
129 
130  /* USER CODE END I2C2_MspInit 1 */
131  }
132 
133 }
134 
135 /**
136 * @brief I2C MSP De-Initialization
137 * This function freeze the hardware resources used in this example
138 * @param hi2c: I2C handle pointer
139 * @retval None
140 */
141 void HAL_I2C_MspDeInit(I2C_HandleTypeDef* hi2c)
142 {
143  if(hi2c->Instance==I2C2)
144  {
145  /* USER CODE BEGIN I2C2_MspDeInit 0 */
146 
147  /* USER CODE END I2C2_MspDeInit 0 */
148  /* Peripheral clock disable */
149  __HAL_RCC_I2C2_CLK_DISABLE();
150 
151  /**I2C2 GPIO Configuration
152  PB10 ------> I2C2_SCL
153  PB11 ------> I2C2_SDA
154  */
155  HAL_GPIO_DeInit(I2C_SCL_GPIO_Port, I2C_SCL_Pin);
156 
157  HAL_GPIO_DeInit(I2C_SDA_GPIO_Port, I2C_SDA_Pin);
158 
159  /* I2C2 interrupt DeInit */
160  HAL_NVIC_DisableIRQ(I2C2_EV_IRQn);
161  /* USER CODE BEGIN I2C2_MspDeInit 1 */
162 
163  /* USER CODE END I2C2_MspDeInit 1 */
164  }
165 
166 }
167 
168 /**
169 * @brief RTC MSP Initialization
170 * This function configures the hardware resources used in this example
171 * @param hrtc: RTC handle pointer
172 * @retval None
173 */
174 void HAL_RTC_MspInit(RTC_HandleTypeDef* hrtc)
175 {
176  RCC_PeriphCLKInitTypeDef PeriphClkInit = {0};
177  if(hrtc->Instance==RTC)
178  {
179  /* USER CODE BEGIN RTC_MspInit 0 */
180 
181  /* USER CODE END RTC_MspInit 0 */
182  /** Initializes the peripherals clock
183  */
184  PeriphClkInit.PeriphClockSelection = RCC_PERIPHCLK_RTC;
185  PeriphClkInit.RTCClockSelection = RCC_RTCCLKSOURCE_LSI;
186  if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInit) != HAL_OK)
187  {
188  Error_Handler();
189  }
190 
191  /* Peripheral clock enable */
192  __HAL_RCC_RTC_ENABLE();
193  /* RTC interrupt Init */
194  HAL_NVIC_SetPriority(RTC_WKUP_IRQn, 0, 0);
195  HAL_NVIC_EnableIRQ(RTC_WKUP_IRQn);
196  HAL_NVIC_SetPriority(RTC_Alarm_IRQn, 0, 0);
197  HAL_NVIC_EnableIRQ(RTC_Alarm_IRQn);
198  /* USER CODE BEGIN RTC_MspInit 1 */
199 
200  /* USER CODE END RTC_MspInit 1 */
201  }
202 
203 }
204 
205 /**
206 * @brief RTC MSP De-Initialization
207 * This function freeze the hardware resources used in this example
208 * @param hrtc: RTC handle pointer
209 * @retval None
210 */
211 void HAL_RTC_MspDeInit(RTC_HandleTypeDef* hrtc)
212 {
213  if(hrtc->Instance==RTC)
214  {
215  /* USER CODE BEGIN RTC_MspDeInit 0 */
216 
217  /* USER CODE END RTC_MspDeInit 0 */
218  /* Peripheral clock disable */
219  __HAL_RCC_RTC_DISABLE();
220 
221  /* RTC interrupt DeInit */
222  HAL_NVIC_DisableIRQ(RTC_WKUP_IRQn);
223  HAL_NVIC_DisableIRQ(RTC_Alarm_IRQn);
224  /* USER CODE BEGIN RTC_MspDeInit 1 */
225 
226  /* USER CODE END RTC_MspDeInit 1 */
227  }
228 
229 }
230 
231 /**
232 * @brief SPI MSP Initialization
233 * This function configures the hardware resources used in this example
234 * @param hspi: SPI handle pointer
235 * @retval None
236 */
237 void HAL_SPI_MspInit(SPI_HandleTypeDef* hspi)
238 {
239  GPIO_InitTypeDef GPIO_InitStruct = {0};
240  if(hspi->Instance==SPI1)
241  {
242  /* USER CODE BEGIN SPI1_MspInit 0 */
243 
244  /* USER CODE END SPI1_MspInit 0 */
245  /* Peripheral clock enable */
246  __HAL_RCC_SPI1_CLK_ENABLE();
247 
248  __HAL_RCC_GPIOA_CLK_ENABLE();
249  /**SPI1 GPIO Configuration
250  PA7 ------> SPI1_MOSI
251  PA6 ------> SPI1_MISO
252  PA5 ------> SPI1_SCK
253  */
254  GPIO_InitStruct.Pin = SPI_MOSI_Pin|SPI_MISO_Pin|SPI_SCK_Pin;
255  GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
256  GPIO_InitStruct.Pull = GPIO_NOPULL;
257  GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
258  GPIO_InitStruct.Alternate = GPIO_AF5_SPI1;
259  HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
260 
261  /* SPI1 DMA Init */
262  /* SPI1_RX Init */
263  hdma_spi1_rx.Instance = DMA1_Channel2;
264  hdma_spi1_rx.Init.Request = DMA_REQUEST_1;
265  hdma_spi1_rx.Init.Direction = DMA_PERIPH_TO_MEMORY;
266  hdma_spi1_rx.Init.PeriphInc = DMA_PINC_DISABLE;
267  hdma_spi1_rx.Init.MemInc = DMA_MINC_ENABLE;
268  hdma_spi1_rx.Init.PeriphDataAlignment = DMA_PDATAALIGN_HALFWORD;
269  hdma_spi1_rx.Init.MemDataAlignment = DMA_MDATAALIGN_HALFWORD;
270  hdma_spi1_rx.Init.Mode = DMA_NORMAL;
271  hdma_spi1_rx.Init.Priority = DMA_PRIORITY_LOW;
272  if (HAL_DMA_Init(&hdma_spi1_rx) != HAL_OK)
273  {
274  Error_Handler();
275  }
276 
277  __HAL_LINKDMA(hspi,hdmarx,hdma_spi1_rx);
278 
279  /* SPI1_TX Init */
280  hdma_spi1_tx.Instance = DMA1_Channel3;
281  hdma_spi1_tx.Init.Request = DMA_REQUEST_1;
282  hdma_spi1_tx.Init.Direction = DMA_MEMORY_TO_PERIPH;
283  hdma_spi1_tx.Init.PeriphInc = DMA_PINC_DISABLE;
284  hdma_spi1_tx.Init.MemInc = DMA_MINC_ENABLE;
285  hdma_spi1_tx.Init.PeriphDataAlignment = DMA_PDATAALIGN_HALFWORD;
286  hdma_spi1_tx.Init.MemDataAlignment = DMA_MDATAALIGN_HALFWORD;
287  hdma_spi1_tx.Init.Mode = DMA_NORMAL;
288  hdma_spi1_tx.Init.Priority = DMA_PRIORITY_LOW;
289  if (HAL_DMA_Init(&hdma_spi1_tx) != HAL_OK)
290  {
291  Error_Handler();
292  }
293 
294  __HAL_LINKDMA(hspi,hdmatx,hdma_spi1_tx);
295 
296  /* USER CODE BEGIN SPI1_MspInit 1 */
297 
298  /* USER CODE END SPI1_MspInit 1 */
299  }
300 
301 }
302 
303 /**
304 * @brief SPI MSP De-Initialization
305 * This function freeze the hardware resources used in this example
306 * @param hspi: SPI handle pointer
307 * @retval None
308 */
309 void HAL_SPI_MspDeInit(SPI_HandleTypeDef* hspi)
310 {
311  if(hspi->Instance==SPI1)
312  {
313  /* USER CODE BEGIN SPI1_MspDeInit 0 */
314 
315  /* USER CODE END SPI1_MspDeInit 0 */
316  /* Peripheral clock disable */
317  __HAL_RCC_SPI1_CLK_DISABLE();
318 
319  /**SPI1 GPIO Configuration
320  PA7 ------> SPI1_MOSI
321  PA6 ------> SPI1_MISO
322  PA5 ------> SPI1_SCK
323  */
324  HAL_GPIO_DeInit(GPIOA, SPI_MOSI_Pin|SPI_MISO_Pin|SPI_SCK_Pin);
325 
326  /* SPI1 DMA DeInit */
327  HAL_DMA_DeInit(hspi->hdmarx);
328  HAL_DMA_DeInit(hspi->hdmatx);
329  /* USER CODE BEGIN SPI1_MspDeInit 1 */
330 
331  /* USER CODE END SPI1_MspDeInit 1 */
332  }
333 
334 }
335 
336 /**
337 * @brief UART MSP Initialization
338 * This function configures the hardware resources used in this example
339 * @param huart: UART handle pointer
340 * @retval None
341 */
342 void HAL_UART_MspInit(UART_HandleTypeDef* huart)
343 {
344  GPIO_InitTypeDef GPIO_InitStruct = {0};
345  RCC_PeriphCLKInitTypeDef PeriphClkInit = {0};
346  if(huart->Instance==USART1)
347  {
348  /* USER CODE BEGIN USART1_MspInit 0 */
349 
350  /* USER CODE END USART1_MspInit 0 */
351  /** Initializes the peripherals clock
352  */
353  PeriphClkInit.PeriphClockSelection = RCC_PERIPHCLK_USART1;
354  PeriphClkInit.Usart1ClockSelection = RCC_USART1CLKSOURCE_PCLK2;
355  if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInit) != HAL_OK)
356  {
357  Error_Handler();
358  }
359 
360  /* Peripheral clock enable */
361  __HAL_RCC_USART1_CLK_ENABLE();
362 
363  __HAL_RCC_GPIOA_CLK_ENABLE();
364  /**USART1 GPIO Configuration
365  PA10 ------> USART1_RX
366  PA9 ------> USART1_TX
367  */
368  GPIO_InitStruct.Pin = DEBUG_UART_RX_Pin|DEBUG_UART_TX_Pin;
369  GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
370  GPIO_InitStruct.Pull = GPIO_NOPULL;
371  GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
372  GPIO_InitStruct.Alternate = GPIO_AF7_USART1;
373  HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
374 
375  /* USER CODE BEGIN USART1_MspInit 1 */
376 
377  /* USER CODE END USART1_MspInit 1 */
378  }
379  else if(huart->Instance==USART2)
380  {
381  /* USER CODE BEGIN USART2_MspInit 0 */
382 
383  /* USER CODE END USART2_MspInit 0 */
384 
385  /** Initializes the peripherals clock
386  */
387  PeriphClkInit.PeriphClockSelection = RCC_PERIPHCLK_USART2;
388  PeriphClkInit.Usart2ClockSelection = RCC_USART2CLKSOURCE_PCLK1;
389  if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInit) != HAL_OK)
390  {
391  Error_Handler();
392  }
393 
394  /* Peripheral clock enable */
395  __HAL_RCC_USART2_CLK_ENABLE();
396 
397  __HAL_RCC_GPIOA_CLK_ENABLE();
398  /**USART2 GPIO Configuration
399  PA3 ------> USART2_RX
400  PA2 ------> USART2_TX
401  PA0 ------> USART2_CTS
402  PA1 ------> USART2_RTS
403  */
404  GPIO_InitStruct.Pin = UART_RX_Pin|UART_TX_Pin|UART_CTS_Pin|UART_RTS_Pin;
405  GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
406  GPIO_InitStruct.Pull = GPIO_NOPULL;
407  GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
408  GPIO_InitStruct.Alternate = GPIO_AF7_USART2;
409  HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
410 
411  /* USART2 DMA Init */
412  /* USART2_RX Init */
413  hdma_usart2_rx.Instance = DMA1_Channel6;
414  hdma_usart2_rx.Init.Request = DMA_REQUEST_2;
415  hdma_usart2_rx.Init.Direction = DMA_PERIPH_TO_MEMORY;
416  hdma_usart2_rx.Init.PeriphInc = DMA_PINC_DISABLE;
417  hdma_usart2_rx.Init.MemInc = DMA_MINC_ENABLE;
418  hdma_usart2_rx.Init.PeriphDataAlignment = DMA_PDATAALIGN_BYTE;
419  hdma_usart2_rx.Init.MemDataAlignment = DMA_MDATAALIGN_BYTE;
420  hdma_usart2_rx.Init.Mode = DMA_NORMAL;
421  hdma_usart2_rx.Init.Priority = DMA_PRIORITY_LOW;
422  if (HAL_DMA_Init(&hdma_usart2_rx) != HAL_OK)
423  {
424  Error_Handler();
425  }
426 
427  __HAL_LINKDMA(huart,hdmarx,hdma_usart2_rx);
428 
429  /* USART2_TX Init */
430  hdma_usart2_tx.Instance = DMA1_Channel7;
431  hdma_usart2_tx.Init.Request = DMA_REQUEST_2;
432  hdma_usart2_tx.Init.Direction = DMA_MEMORY_TO_PERIPH;
433  hdma_usart2_tx.Init.PeriphInc = DMA_PINC_DISABLE;
434  hdma_usart2_tx.Init.MemInc = DMA_MINC_ENABLE;
435  hdma_usart2_tx.Init.PeriphDataAlignment = DMA_PDATAALIGN_BYTE;
436  hdma_usart2_tx.Init.MemDataAlignment = DMA_MDATAALIGN_BYTE;
437  hdma_usart2_tx.Init.Mode = DMA_NORMAL;
438  hdma_usart2_tx.Init.Priority = DMA_PRIORITY_LOW;
439  if (HAL_DMA_Init(&hdma_usart2_tx) != HAL_OK)
440  {
441  Error_Handler();
442  }
443 
444  __HAL_LINKDMA(huart,hdmatx,hdma_usart2_tx);
445 
446  /* USART2 interrupt Init */
447  HAL_NVIC_SetPriority(USART2_IRQn, 0, 0);
448  HAL_NVIC_EnableIRQ(USART2_IRQn);
449  /* USER CODE BEGIN USART2_MspInit 1 */
450 
451  /* USER CODE END USART2_MspInit 1 */
452  }
453 
454 }
455 
456 /**
457 * @brief UART MSP De-Initialization
458 * This function freeze the hardware resources used in this example
459 * @param huart: UART handle pointer
460 * @retval None
461 */
462 void HAL_UART_MspDeInit(UART_HandleTypeDef* huart)
463 {
464  if(huart->Instance==USART1)
465  {
466  /* USER CODE BEGIN USART1_MspDeInit 0 */
467 
468  /* USER CODE END USART1_MspDeInit 0 */
469  /* Peripheral clock disable */
470  __HAL_RCC_USART1_CLK_DISABLE();
471 
472  /**USART1 GPIO Configuration
473  PA10 ------> USART1_RX
474  PA9 ------> USART1_TX
475  */
476  HAL_GPIO_DeInit(GPIOA, DEBUG_UART_RX_Pin|DEBUG_UART_TX_Pin);
477 
478  /* USER CODE BEGIN USART1_MspDeInit 1 */
479 
480  /* USER CODE END USART1_MspDeInit 1 */
481  }
482  else if(huart->Instance==USART2)
483  {
484  /* USER CODE BEGIN USART2_MspDeInit 0 */
485 
486  /* USER CODE END USART2_MspDeInit 0 */
487  /* Peripheral clock disable */
488  __HAL_RCC_USART2_CLK_DISABLE();
489 
490  /**USART2 GPIO Configuration
491  PA3 ------> USART2_RX
492  PA2 ------> USART2_TX
493  PA0 ------> USART2_CTS
494  PA1 ------> USART2_RTS
495  */
496  HAL_GPIO_DeInit(GPIOA, UART_RX_Pin|UART_TX_Pin|UART_CTS_Pin|UART_RTS_Pin);
497 
498  /* USART2 DMA DeInit */
499  HAL_DMA_DeInit(huart->hdmarx);
500  HAL_DMA_DeInit(huart->hdmatx);
501 
502  /* USART2 interrupt DeInit */
503  HAL_NVIC_DisableIRQ(USART2_IRQn);
504  /* USER CODE BEGIN USART2_MspDeInit 1 */
505 
506  /* USER CODE END USART2_MspDeInit 1 */
507  }
508 
509 }
510 
511 /* USER CODE BEGIN 1 */
512 
513 /* USER CODE END 1 */
514 
515 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
hdma_spi1_rx
DMA_HandleTypeDef hdma_spi1_rx
SPI_MISO_Pin
#define SPI_MISO_Pin
Definition: main.h:90
HAL_UART_MspInit
void HAL_UART_MspInit(UART_HandleTypeDef *huart)
UART MSP Initialization This function configures the hardware resources used in this example.
Definition: stm32l4xx_hal_msp.c:342
hrtc
RTC_HandleTypeDef hrtc
DEBUG_UART_RX_Pin
#define DEBUG_UART_RX_Pin
Definition: main.h:70
SPI_SCK_Pin
#define SPI_SCK_Pin
Definition: main.h:92
HAL_I2C_MspDeInit
void HAL_I2C_MspDeInit(I2C_HandleTypeDef *hi2c)
I2C MSP De-Initialization This function freeze the hardware resources used in this example.
Definition: stm32l4xx_hal_msp.c:141
SPI_MOSI_Pin
#define SPI_MOSI_Pin
Definition: main.h:88
HAL_SPI_MspDeInit
void HAL_SPI_MspDeInit(SPI_HandleTypeDef *hspi)
SPI MSP De-Initialization This function freeze the hardware resources used in this example.
Definition: stm32l4xx_hal_msp.c:309
hdma_usart2_rx
DMA_HandleTypeDef hdma_usart2_rx
HAL_MspInit
void HAL_MspInit(void)
Definition: stm32l4xx_hal_msp.c:71
HAL_I2C_MspInit
void HAL_I2C_MspInit(I2C_HandleTypeDef *hi2c)
I2C MSP Initialization This function configures the hardware resources used in this example.
Definition: stm32l4xx_hal_msp.c:93
I2C_SDA_Pin
#define I2C_SDA_Pin
Definition: main.h:86
UART_TX_Pin
#define UART_TX_Pin
Definition: main.h:82
HAL_SPI_MspInit
void HAL_SPI_MspInit(SPI_HandleTypeDef *hspi)
SPI MSP Initialization This function configures the hardware resources used in this example.
Definition: stm32l4xx_hal_msp.c:237
hdma_spi1_tx
DMA_HandleTypeDef hdma_spi1_tx
hdma_usart2_tx
DMA_HandleTypeDef hdma_usart2_tx
I2C_SCL_GPIO_Port
#define I2C_SCL_GPIO_Port
Definition: main.h:79
I2C_SDA_GPIO_Port
#define I2C_SDA_GPIO_Port
Definition: main.h:87
HAL_RTC_MspDeInit
void HAL_RTC_MspDeInit(RTC_HandleTypeDef *hrtc)
RTC MSP De-Initialization This function freeze the hardware resources used in this example.
Definition: stm32l4xx_hal_msp.c:211
HAL_UART_MspDeInit
void HAL_UART_MspDeInit(UART_HandleTypeDef *huart)
UART MSP De-Initialization This function freeze the hardware resources used in this example.
Definition: stm32l4xx_hal_msp.c:462
main.h
: Header for main.c file. This file contains the common defines of the application.
Error_Handler
void Error_Handler(void)
DEBUG_UART_TX_Pin
#define DEBUG_UART_TX_Pin
Definition: main.h:74
UART_RTS_Pin
#define UART_RTS_Pin
Definition: main.h:102
UART_CTS_Pin
#define UART_CTS_Pin
Definition: main.h:94
HAL_RTC_MspInit
void HAL_RTC_MspInit(RTC_HandleTypeDef *hrtc)
RTC MSP Initialization This function configures the hardware resources used in this example.
Definition: stm32l4xx_hal_msp.c:174
I2C_SCL_Pin
#define I2C_SCL_Pin
Definition: main.h:78
UART_RX_Pin
#define UART_RX_Pin
Definition: main.h:80