Da Vinci Firmware 1
Firmware for the DaVinci-M rocket avionics board.
Loading...
Searching...
No Matches
stm32h7xx_hal_msp.c File Reference

This file provides code for the MSP Initialization and de-Initialization codes. More...

#include "main.h"
Include dependency graph for stm32h7xx_hal_msp.c:

Go to the source code of this file.

Functions

void HAL_TIM_MspPostInit (TIM_HandleTypeDef *htim)
 
void HAL_MspInit (void)
 
void HAL_ADC_MspInit (ADC_HandleTypeDef *hadc)
 ADC MSP Initialization This function configures the hardware resources used in this example.
 
void HAL_ADC_MspDeInit (ADC_HandleTypeDef *hadc)
 ADC MSP De-Initialization This function freeze the hardware resources used in this example.
 
void HAL_FDCAN_MspInit (FDCAN_HandleTypeDef *hfdcan)
 FDCAN MSP Initialization This function configures the hardware resources used in this example.
 
void HAL_FDCAN_MspDeInit (FDCAN_HandleTypeDef *hfdcan)
 FDCAN MSP De-Initialization This function freeze the hardware resources used in this example.
 
void HAL_QSPI_MspInit (QSPI_HandleTypeDef *hqspi)
 QSPI MSP Initialization This function configures the hardware resources used in this example.
 
void HAL_QSPI_MspDeInit (QSPI_HandleTypeDef *hqspi)
 QSPI MSP De-Initialization This function freeze the hardware resources used in this example.
 
void HAL_SPI_MspInit (SPI_HandleTypeDef *hspi)
 SPI MSP Initialization This function configures the hardware resources used in this example.
 
void HAL_SPI_MspDeInit (SPI_HandleTypeDef *hspi)
 SPI MSP De-Initialization This function freeze the hardware resources used in this example.
 
void HAL_TIM_PWM_MspInit (TIM_HandleTypeDef *htim_pwm)
 TIM_PWM MSP Initialization This function configures the hardware resources used in this example.
 
void HAL_TIM_Base_MspInit (TIM_HandleTypeDef *htim_base)
 TIM_Base MSP Initialization This function configures the hardware resources used in this example.
 
void HAL_TIM_PWM_MspDeInit (TIM_HandleTypeDef *htim_pwm)
 TIM_PWM MSP De-Initialization This function freeze the hardware resources used in this example.
 
void HAL_TIM_Base_MspDeInit (TIM_HandleTypeDef *htim_base)
 TIM_Base MSP De-Initialization This function freeze the hardware resources used in this example.
 
void HAL_UART_MspInit (UART_HandleTypeDef *huart)
 UART MSP Initialization This function configures the hardware resources used in this example.
 
void HAL_UART_MspDeInit (UART_HandleTypeDef *huart)
 UART MSP De-Initialization This function freeze the hardware resources used in this example.
 
void HAL_PCD_MspInit (PCD_HandleTypeDef *hpcd)
 PCD MSP Initialization This function configures the hardware resources used in this example.
 
void HAL_PCD_MspDeInit (PCD_HandleTypeDef *hpcd)
 PCD MSP De-Initialization This function freeze the hardware resources used in this example.
 

Variables

MDMA_HandleTypeDef hmdma_quadspi_fifo_th
 
DMA_HandleTypeDef hdma_usart1_rx
 
DMA_HandleTypeDef hdma_usart1_tx
 
static uint32_t HAL_RCC_ADC12_CLK_ENABLED =0
 

Detailed Description

This file provides code for the MSP Initialization and de-Initialization codes.

Attention

Copyright (c) 2025 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.

Definition in file stm32h7xx_hal_msp.c.

Function Documentation

◆ HAL_ADC_MspDeInit()

void HAL_ADC_MspDeInit ( ADC_HandleTypeDef *  hadc)

ADC MSP De-Initialization This function freeze the hardware resources used in this example.

Parameters
hadcADC handle pointer
Return values
None

ADC1 GPIO Configuration PC1 ---—> ADC1_INP11 PC5 ---—> ADC1_INP8

ADC2 GPIO Configuration PB0 ---—> ADC2_INP9

ADC3 GPIO Configuration PC1 ---—> ADC3_INP11

Definition at line 178 of file stm32h7xx_hal_msp.c.

179{
180 if(hadc->Instance==ADC1)
181 {
182 /* USER CODE BEGIN ADC1_MspDeInit 0 */
183
184 /* USER CODE END ADC1_MspDeInit 0 */
185 /* Peripheral clock disable */
188 __HAL_RCC_ADC12_CLK_DISABLE();
189 }
190
195 HAL_GPIO_DeInit(GPIOC, ADC3_BATTERY_Pin|ADC1_Pyrocheck1_Pin);
196
197 /* USER CODE BEGIN ADC1_MspDeInit 1 */
198
199 /* USER CODE END ADC1_MspDeInit 1 */
200 }
201 else if(hadc->Instance==ADC2)
202 {
203 /* USER CODE BEGIN ADC2_MspDeInit 0 */
204
205 /* USER CODE END ADC2_MspDeInit 0 */
206 /* Peripheral clock disable */
209 __HAL_RCC_ADC12_CLK_DISABLE();
210 }
211
215 HAL_GPIO_DeInit(ADC2_Pyrocheck2_GPIO_Port, ADC2_Pyrocheck2_Pin);
216
217 /* USER CODE BEGIN ADC2_MspDeInit 1 */
218
219 /* USER CODE END ADC2_MspDeInit 1 */
220 }
221 else if(hadc->Instance==ADC3)
222 {
223 /* USER CODE BEGIN ADC3_MspDeInit 0 */
224
225 /* USER CODE END ADC3_MspDeInit 0 */
226 /* Peripheral clock disable */
227 __HAL_RCC_ADC3_CLK_DISABLE();
228
232 HAL_GPIO_DeInit(ADC3_BATTERY_GPIO_Port, ADC3_BATTERY_Pin);
233
234 /* USER CODE BEGIN ADC3_MspDeInit 1 */
235
236 /* USER CODE END ADC3_MspDeInit 1 */
237 }
238
239}
static uint32_t HAL_RCC_ADC12_CLK_ENABLED

References HAL_RCC_ADC12_CLK_ENABLED.

◆ HAL_ADC_MspInit()

void HAL_ADC_MspInit ( ADC_HandleTypeDef *  hadc)

ADC MSP Initialization This function configures the hardware resources used in this example.

Parameters
hadcADC handle pointer
Return values
None

ADC1 GPIO Configuration PC1 ---—> ADC1_INP11 PC5 ---—> ADC1_INP8

ADC2 GPIO Configuration PB0 ---—> ADC2_INP9

ADC3 GPIO Configuration PC1 ---—> ADC3_INP11

Definition at line 96 of file stm32h7xx_hal_msp.c.

97{
98 GPIO_InitTypeDef GPIO_InitStruct = {0};
99 if(hadc->Instance==ADC1)
100 {
101 /* USER CODE BEGIN ADC1_MspInit 0 */
102
103 /* USER CODE END ADC1_MspInit 0 */
104 /* Peripheral clock enable */
107 __HAL_RCC_ADC12_CLK_ENABLE();
108 }
109
110 __HAL_RCC_GPIOC_CLK_ENABLE();
115 GPIO_InitStruct.Pin = ADC3_BATTERY_Pin|ADC1_Pyrocheck1_Pin;
116 GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;
117 GPIO_InitStruct.Pull = GPIO_NOPULL;
118 HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
119
120 /* USER CODE BEGIN ADC1_MspInit 1 */
121
122 /* USER CODE END ADC1_MspInit 1 */
123 }
124 else if(hadc->Instance==ADC2)
125 {
126 /* USER CODE BEGIN ADC2_MspInit 0 */
127
128 /* USER CODE END ADC2_MspInit 0 */
129 /* Peripheral clock enable */
132 __HAL_RCC_ADC12_CLK_ENABLE();
133 }
134
135 __HAL_RCC_GPIOB_CLK_ENABLE();
139 GPIO_InitStruct.Pin = ADC2_Pyrocheck2_Pin;
140 GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;
141 GPIO_InitStruct.Pull = GPIO_NOPULL;
142 HAL_GPIO_Init(ADC2_Pyrocheck2_GPIO_Port, &GPIO_InitStruct);
143
144 /* USER CODE BEGIN ADC2_MspInit 1 */
145
146 /* USER CODE END ADC2_MspInit 1 */
147 }
148 else if(hadc->Instance==ADC3)
149 {
150 /* USER CODE BEGIN ADC3_MspInit 0 */
151
152 /* USER CODE END ADC3_MspInit 0 */
153 /* Peripheral clock enable */
154 __HAL_RCC_ADC3_CLK_ENABLE();
155
156 __HAL_RCC_GPIOC_CLK_ENABLE();
160 GPIO_InitStruct.Pin = ADC3_BATTERY_Pin;
161 GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;
162 GPIO_InitStruct.Pull = GPIO_NOPULL;
163 HAL_GPIO_Init(ADC3_BATTERY_GPIO_Port, &GPIO_InitStruct);
164
165 /* USER CODE BEGIN ADC3_MspInit 1 */
166
167 /* USER CODE END ADC3_MspInit 1 */
168 }
169
170}

References HAL_RCC_ADC12_CLK_ENABLED.

◆ HAL_FDCAN_MspDeInit()

void HAL_FDCAN_MspDeInit ( FDCAN_HandleTypeDef *  hfdcan)

FDCAN MSP De-Initialization This function freeze the hardware resources used in this example.

Parameters
hfdcanFDCAN handle pointer
Return values
None

FDCAN1 GPIO Configuration PB8 ---—> FDCAN1_RX PB9 ---—> FDCAN1_TX

Definition at line 295 of file stm32h7xx_hal_msp.c.

296{
297 if(hfdcan->Instance==FDCAN1)
298 {
299 /* USER CODE BEGIN FDCAN1_MspDeInit 0 */
300
301 /* USER CODE END FDCAN1_MspDeInit 0 */
302 /* Peripheral clock disable */
303 __HAL_RCC_FDCAN_CLK_DISABLE();
304
309 HAL_GPIO_DeInit(GPIOB, GPIO_PIN_8|GPIO_PIN_9);
310
311 /* USER CODE BEGIN FDCAN1_MspDeInit 1 */
312
313 /* USER CODE END FDCAN1_MspDeInit 1 */
314 }
315
316}

◆ HAL_FDCAN_MspInit()

void HAL_FDCAN_MspInit ( FDCAN_HandleTypeDef *  hfdcan)

FDCAN MSP Initialization This function configures the hardware resources used in this example.

Parameters
hfdcanFDCAN handle pointer
Return values
None

Initializes the peripherals clock

FDCAN1 GPIO Configuration PB8 ---—> FDCAN1_RX PB9 ---—> FDCAN1_TX

Definition at line 247 of file stm32h7xx_hal_msp.c.

248{
249 GPIO_InitTypeDef GPIO_InitStruct = {0};
250 RCC_PeriphCLKInitTypeDef PeriphClkInitStruct = {0};
251 if(hfdcan->Instance==FDCAN1)
252 {
253 /* USER CODE BEGIN FDCAN1_MspInit 0 */
254
255 /* USER CODE END FDCAN1_MspInit 0 */
256
259 PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_FDCAN;
260 PeriphClkInitStruct.FdcanClockSelection = RCC_FDCANCLKSOURCE_PLL;
261 if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK)
262 {
264 }
265
266 /* Peripheral clock enable */
267 __HAL_RCC_FDCAN_CLK_ENABLE();
268
269 __HAL_RCC_GPIOB_CLK_ENABLE();
274 GPIO_InitStruct.Pin = GPIO_PIN_8|GPIO_PIN_9;
275 GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
276 GPIO_InitStruct.Pull = GPIO_NOPULL;
277 GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
278 GPIO_InitStruct.Alternate = GPIO_AF9_FDCAN1;
279 HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
280
281 /* USER CODE BEGIN FDCAN1_MspInit 1 */
282
283 /* USER CODE END FDCAN1_MspInit 1 */
284
285 }
286
287}
void Error_Handler(void)
This function is executed in case of error occurrence.
Definition main.c:2042
@ HAL_OK

References Error_Handler(), and HAL_OK.

Here is the call graph for this function:

◆ HAL_MspInit()

void HAL_MspInit ( void  )

Initializes the Global MSP.

Definition at line 70 of file stm32h7xx_hal_msp.c.

71{
72
73 /* USER CODE BEGIN MspInit 0 */
74
75 /* USER CODE END MspInit 0 */
76
77 __HAL_RCC_SYSCFG_CLK_ENABLE();
78
79 /* System interrupt init*/
80 /* PendSV_IRQn interrupt configuration */
81 HAL_NVIC_SetPriority(PendSV_IRQn, 15, 0);
82
83 /* USER CODE BEGIN MspInit 1 */
84
85 /* USER CODE END MspInit 1 */
86}

◆ HAL_PCD_MspDeInit()

void HAL_PCD_MspDeInit ( PCD_HandleTypeDef *  hpcd)

PCD MSP De-Initialization This function freeze the hardware resources used in this example.

Parameters
hpcdPCD handle pointer
Return values
None

USB_OTG_FS GPIO Configuration PA11 ---—> USB_OTG_FS_DM PA12 ---—> USB_OTG_FS_DP

Definition at line 1114 of file stm32h7xx_hal_msp.c.

1115{
1116 if(hpcd->Instance==USB_OTG_FS)
1117 {
1118 /* USER CODE BEGIN USB_OTG_FS_MspDeInit 0 */
1119
1120 /* USER CODE END USB_OTG_FS_MspDeInit 0 */
1121 /* Peripheral clock disable */
1122 __HAL_RCC_USB_OTG_FS_CLK_DISABLE();
1123
1128 HAL_GPIO_DeInit(GPIOA, GPIO_PIN_11|GPIO_PIN_12);
1129
1130 /* USER CODE BEGIN USB_OTG_FS_MspDeInit 1 */
1131
1132 /* USER CODE END USB_OTG_FS_MspDeInit 1 */
1133 }
1134
1135}

◆ HAL_PCD_MspInit()

void HAL_PCD_MspInit ( PCD_HandleTypeDef *  hpcd)

PCD MSP Initialization This function configures the hardware resources used in this example.

Parameters
hpcdPCD handle pointer
Return values
None

Initializes the peripherals clock

Enable USB Voltage detector

USB_OTG_FS GPIO Configuration PA11 ---—> USB_OTG_FS_DM PA12 ---—> USB_OTG_FS_DP

Definition at line 1063 of file stm32h7xx_hal_msp.c.

1064{
1065 GPIO_InitTypeDef GPIO_InitStruct = {0};
1066 RCC_PeriphCLKInitTypeDef PeriphClkInitStruct = {0};
1067 if(hpcd->Instance==USB_OTG_FS)
1068 {
1069 /* USER CODE BEGIN USB_OTG_FS_MspInit 0 */
1070
1071 /* USER CODE END USB_OTG_FS_MspInit 0 */
1072
1075 PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_USB;
1076 PeriphClkInitStruct.UsbClockSelection = RCC_USBCLKSOURCE_PLL;
1077 if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK)
1078 {
1079 Error_Handler();
1080 }
1081
1084 HAL_PWREx_EnableUSBVoltageDetector();
1085
1086 __HAL_RCC_GPIOA_CLK_ENABLE();
1091 GPIO_InitStruct.Pin = GPIO_PIN_11|GPIO_PIN_12;
1092 GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
1093 GPIO_InitStruct.Pull = GPIO_NOPULL;
1094 GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
1095 GPIO_InitStruct.Alternate = GPIO_AF10_OTG1_FS;
1096 HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
1097
1098 /* Peripheral clock enable */
1099 __HAL_RCC_USB_OTG_FS_CLK_ENABLE();
1100 /* USER CODE BEGIN USB_OTG_FS_MspInit 1 */
1101
1102 /* USER CODE END USB_OTG_FS_MspInit 1 */
1103
1104 }
1105
1106}

References Error_Handler(), and HAL_OK.

Here is the call graph for this function:

◆ HAL_QSPI_MspDeInit()

void HAL_QSPI_MspDeInit ( QSPI_HandleTypeDef *  hqspi)

QSPI MSP De-Initialization This function freeze the hardware resources used in this example.

Parameters
hqspiQSPI handle pointer
Return values
None

QUADSPI GPIO Configuration PB2 ---—> QUADSPI_CLK PE7 ---—> QUADSPI_BK2_IO0 PE8 ---—> QUADSPI_BK2_IO1 PE9 ---—> QUADSPI_BK2_IO2 PE10 ---—> QUADSPI_BK2_IO3 PC11 ---—> QUADSPI_BK2_NCS

Definition at line 424 of file stm32h7xx_hal_msp.c.

425{
426 if(hqspi->Instance==QUADSPI)
427 {
428 /* USER CODE BEGIN QUADSPI_MspDeInit 0 */
429
430 /* USER CODE END QUADSPI_MspDeInit 0 */
431 /* Peripheral clock disable */
432 __HAL_RCC_QSPI_CLK_DISABLE();
433
442 HAL_GPIO_DeInit(GPIOB, GPIO_PIN_2);
443
444 HAL_GPIO_DeInit(GPIOE, GPIO_PIN_7|GPIO_PIN_8|GPIO_PIN_9|GPIO_PIN_10);
445
446 HAL_GPIO_DeInit(GPIOC, GPIO_PIN_11);
447
448 /* QUADSPI MDMA DeInit */
449 HAL_MDMA_DeInit(hqspi->hmdma);
450
451 /* QUADSPI interrupt DeInit */
452 HAL_NVIC_DisableIRQ(QUADSPI_IRQn);
453 /* USER CODE BEGIN QUADSPI_MspDeInit 1 */
454
455 /* USER CODE END QUADSPI_MspDeInit 1 */
456 }
457
458}
QSPI_HandleTypeDef hqspi
HAL QSPI handle for the external flash memory.
Definition main.c:58

References hqspi.

◆ HAL_QSPI_MspInit()

void HAL_QSPI_MspInit ( QSPI_HandleTypeDef *  hqspi)

QSPI MSP Initialization This function configures the hardware resources used in this example.

Parameters
hqspiQSPI handle pointer
Return values
None

Initializes the peripherals clock

QUADSPI GPIO Configuration PB2 ---—> QUADSPI_CLK PE7 ---—> QUADSPI_BK2_IO0 PE8 ---—> QUADSPI_BK2_IO1 PE9 ---—> QUADSPI_BK2_IO2 PE10 ---—> QUADSPI_BK2_IO3 PC11 ---—> QUADSPI_BK2_NCS

Definition at line 324 of file stm32h7xx_hal_msp.c.

325{
326 GPIO_InitTypeDef GPIO_InitStruct = {0};
327 RCC_PeriphCLKInitTypeDef PeriphClkInitStruct = {0};
328 if(hqspi->Instance==QUADSPI)
329 {
330 /* USER CODE BEGIN QUADSPI_MspInit 0 */
331
332 /* USER CODE END QUADSPI_MspInit 0 */
333
336 PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_QSPI;
337 PeriphClkInitStruct.QspiClockSelection = RCC_QSPICLKSOURCE_D1HCLK;
338 if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK)
339 {
341 }
342
343 /* Peripheral clock enable */
344 __HAL_RCC_QSPI_CLK_ENABLE();
345
346 __HAL_RCC_GPIOB_CLK_ENABLE();
347 __HAL_RCC_GPIOE_CLK_ENABLE();
348 __HAL_RCC_GPIOC_CLK_ENABLE();
357 GPIO_InitStruct.Pin = GPIO_PIN_2;
358 GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
359 GPIO_InitStruct.Pull = GPIO_NOPULL;
360 GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
361 GPIO_InitStruct.Alternate = GPIO_AF9_QUADSPI;
362 HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
363
364 GPIO_InitStruct.Pin = GPIO_PIN_7|GPIO_PIN_8|GPIO_PIN_9|GPIO_PIN_10;
365 GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
366 GPIO_InitStruct.Pull = GPIO_NOPULL;
367 GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
368 GPIO_InitStruct.Alternate = GPIO_AF10_QUADSPI;
369 HAL_GPIO_Init(GPIOE, &GPIO_InitStruct);
370
371 GPIO_InitStruct.Pin = GPIO_PIN_11;
372 GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
373 GPIO_InitStruct.Pull = GPIO_NOPULL;
374 GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
375 GPIO_InitStruct.Alternate = GPIO_AF9_QUADSPI;
376 HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
377
378 /* QUADSPI MDMA Init */
379 /* QUADSPI_FIFO_TH Init */
380 hmdma_quadspi_fifo_th.Instance = MDMA_Channel0;
381 hmdma_quadspi_fifo_th.Init.Request = MDMA_REQUEST_QUADSPI_FIFO_TH;
382 hmdma_quadspi_fifo_th.Init.TransferTriggerMode = MDMA_BUFFER_TRANSFER;
383 hmdma_quadspi_fifo_th.Init.Priority = MDMA_PRIORITY_HIGH;
384 hmdma_quadspi_fifo_th.Init.Endianness = MDMA_LITTLE_ENDIANNESS_PRESERVE;
385 hmdma_quadspi_fifo_th.Init.SourceInc = MDMA_SRC_INC_BYTE;
386 hmdma_quadspi_fifo_th.Init.DestinationInc = MDMA_DEST_INC_DISABLE;
387 hmdma_quadspi_fifo_th.Init.SourceDataSize = MDMA_SRC_DATASIZE_BYTE;
388 hmdma_quadspi_fifo_th.Init.DestDataSize = MDMA_DEST_DATASIZE_BYTE;
389 hmdma_quadspi_fifo_th.Init.DataAlignment = MDMA_DATAALIGN_PACKENABLE;
390 hmdma_quadspi_fifo_th.Init.BufferTransferLength = 480;
391 hmdma_quadspi_fifo_th.Init.SourceBurst = MDMA_SOURCE_BURST_SINGLE;
392 hmdma_quadspi_fifo_th.Init.DestBurst = MDMA_DEST_BURST_SINGLE;
393 hmdma_quadspi_fifo_th.Init.SourceBlockAddressOffset = 0;
394 hmdma_quadspi_fifo_th.Init.DestBlockAddressOffset = 0;
395 if (HAL_MDMA_Init(&hmdma_quadspi_fifo_th) != HAL_OK)
396 {
398 }
399
400 if (HAL_MDMA_ConfigPostRequestMask(&hmdma_quadspi_fifo_th, 0, 0) != HAL_OK)
401 {
403 }
404
405 __HAL_LINKDMA(hqspi,hmdma,hmdma_quadspi_fifo_th);
406
407 /* QUADSPI interrupt Init */
408 HAL_NVIC_SetPriority(QUADSPI_IRQn, 5, 0);
409 HAL_NVIC_EnableIRQ(QUADSPI_IRQn);
410 /* USER CODE BEGIN QUADSPI_MspInit 1 */
411
412 /* USER CODE END QUADSPI_MspInit 1 */
413
414 }
415
416}
MDMA_HandleTypeDef hmdma_quadspi_fifo_th
Definition main.c:59

References Error_Handler(), HAL_OK, hmdma_quadspi_fifo_th, and hqspi.

Here is the call graph for this function:

◆ HAL_SPI_MspDeInit()

void HAL_SPI_MspDeInit ( SPI_HandleTypeDef *  hspi)

SPI MSP De-Initialization This function freeze the hardware resources used in this example.

Parameters
hspiSPI handle pointer
Return values
None

SPI1 GPIO Configuration PA5 ---—> SPI1_SCK PA6 ---—> SPI1_MISO PA7 ---—> SPI1_MOSI

SPI2 GPIO Configuration PB13 ---—> SPI2_SCK PB14 ---—> SPI2_MISO PB15 ---—> SPI2_MOSI

SPI3 GPIO Configuration PB3 (JTDO/TRACESWO) ---—> SPI3_SCK PB4 (NJTRST) ---—> SPI3_MISO PB5 ---—> SPI3_MOSI

Definition at line 591 of file stm32h7xx_hal_msp.c.

592{
593 if(hspi->Instance==SPI1)
594 {
595 /* USER CODE BEGIN SPI1_MspDeInit 0 */
596
597 /* USER CODE END SPI1_MspDeInit 0 */
598 /* Peripheral clock disable */
599 __HAL_RCC_SPI1_CLK_DISABLE();
600
606 HAL_GPIO_DeInit(GPIOA, GPIO_PIN_5|GPIO_PIN_6|GPIO_PIN_7);
607
608 /* USER CODE BEGIN SPI1_MspDeInit 1 */
609
610 /* USER CODE END SPI1_MspDeInit 1 */
611 }
612 else if(hspi->Instance==SPI2)
613 {
614 /* USER CODE BEGIN SPI2_MspDeInit 0 */
615
616 /* USER CODE END SPI2_MspDeInit 0 */
617 /* Peripheral clock disable */
618 __HAL_RCC_SPI2_CLK_DISABLE();
619
625 HAL_GPIO_DeInit(GPIOB, GPIO_PIN_13|GPIO_PIN_14|GPIO_PIN_15);
626
627 /* USER CODE BEGIN SPI2_MspDeInit 1 */
628
629 /* USER CODE END SPI2_MspDeInit 1 */
630 }
631 else if(hspi->Instance==SPI3)
632 {
633 /* USER CODE BEGIN SPI3_MspDeInit 0 */
634
635 /* USER CODE END SPI3_MspDeInit 0 */
636 /* Peripheral clock disable */
637 __HAL_RCC_SPI3_CLK_DISABLE();
638
644 HAL_GPIO_DeInit(GPIOB, GPIO_PIN_3|GPIO_PIN_4|SPI3_MOSI_SENSEB_Pin);
645
646 /* USER CODE BEGIN SPI3_MspDeInit 1 */
647
648 /* USER CODE END SPI3_MspDeInit 1 */
649 }
650
651}

◆ HAL_SPI_MspInit()

void HAL_SPI_MspInit ( SPI_HandleTypeDef *  hspi)

SPI MSP Initialization This function configures the hardware resources used in this example.

Parameters
hspiSPI handle pointer
Return values
None

Initializes the peripherals clock

SPI1 GPIO Configuration PA5 ---—> SPI1_SCK PA6 ---—> SPI1_MISO PA7 ---—> SPI1_MOSI

Initializes the peripherals clock

SPI2 GPIO Configuration PB13 ---—> SPI2_SCK PB14 ---—> SPI2_MISO PB15 ---—> SPI2_MOSI

Initializes the peripherals clock

SPI3 GPIO Configuration PB3 (JTDO/TRACESWO) ---—> SPI3_SCK PB4 (NJTRST) ---—> SPI3_MISO PB5 ---—> SPI3_MOSI

Definition at line 466 of file stm32h7xx_hal_msp.c.

467{
468 GPIO_InitTypeDef GPIO_InitStruct = {0};
469 RCC_PeriphCLKInitTypeDef PeriphClkInitStruct = {0};
470 if(hspi->Instance==SPI1)
471 {
472 /* USER CODE BEGIN SPI1_MspInit 0 */
473
474 /* USER CODE END SPI1_MspInit 0 */
475
478 PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_SPI1;
479 PeriphClkInitStruct.Spi123ClockSelection = RCC_SPI123CLKSOURCE_PLL;
480 if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK)
481 {
483 }
484
485 /* Peripheral clock enable */
486 __HAL_RCC_SPI1_CLK_ENABLE();
487
488 __HAL_RCC_GPIOA_CLK_ENABLE();
494 GPIO_InitStruct.Pin = GPIO_PIN_5|GPIO_PIN_6|GPIO_PIN_7;
495 GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
496 GPIO_InitStruct.Pull = GPIO_NOPULL;
497 GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
498 GPIO_InitStruct.Alternate = GPIO_AF5_SPI1;
499 HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
500
501 /* USER CODE BEGIN SPI1_MspInit 1 */
502
503 /* USER CODE END SPI1_MspInit 1 */
504 }
505 else if(hspi->Instance==SPI2)
506 {
507 /* USER CODE BEGIN SPI2_MspInit 0 */
508
509 /* USER CODE END SPI2_MspInit 0 */
510
513 PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_SPI2;
514 PeriphClkInitStruct.Spi123ClockSelection = RCC_SPI123CLKSOURCE_PLL;
515 if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK)
516 {
518 }
519
520 /* Peripheral clock enable */
521 __HAL_RCC_SPI2_CLK_ENABLE();
522
523 __HAL_RCC_GPIOB_CLK_ENABLE();
529 GPIO_InitStruct.Pin = GPIO_PIN_13|GPIO_PIN_14|GPIO_PIN_15;
530 GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
531 GPIO_InitStruct.Pull = GPIO_NOPULL;
532 GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
533 GPIO_InitStruct.Alternate = GPIO_AF5_SPI2;
534 HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
535
536 /* USER CODE BEGIN SPI2_MspInit 1 */
537
538 /* USER CODE END SPI2_MspInit 1 */
539 }
540 else if(hspi->Instance==SPI3)
541 {
542 /* USER CODE BEGIN SPI3_MspInit 0 */
543
544 /* USER CODE END SPI3_MspInit 0 */
545
548 PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_SPI3;
549 PeriphClkInitStruct.Spi123ClockSelection = RCC_SPI123CLKSOURCE_PLL;
550 if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK)
551 {
553 }
554
555 /* Peripheral clock enable */
556 __HAL_RCC_SPI3_CLK_ENABLE();
557
558 __HAL_RCC_GPIOB_CLK_ENABLE();
564 GPIO_InitStruct.Pin = GPIO_PIN_3|GPIO_PIN_4;
565 GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
566 GPIO_InitStruct.Pull = GPIO_NOPULL;
567 GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
568 GPIO_InitStruct.Alternate = GPIO_AF6_SPI3;
569 HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
570
571 GPIO_InitStruct.Pin = SPI3_MOSI_SENSEB_Pin;
572 GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
573 GPIO_InitStruct.Pull = GPIO_NOPULL;
574 GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
575 GPIO_InitStruct.Alternate = GPIO_AF7_SPI3;
576 HAL_GPIO_Init(SPI3_MOSI_SENSEB_GPIO_Port, &GPIO_InitStruct);
577
578 /* USER CODE BEGIN SPI3_MspInit 1 */
579
580 /* USER CODE END SPI3_MspInit 1 */
581 }
582
583}

References Error_Handler(), and HAL_OK.

Here is the call graph for this function:

◆ HAL_TIM_Base_MspDeInit()

void HAL_TIM_Base_MspDeInit ( TIM_HandleTypeDef *  htim_base)

TIM_Base MSP De-Initialization This function freeze the hardware resources used in this example.

Parameters
htim_baseTIM_Base handle pointer
Return values
None

Definition at line 824 of file stm32h7xx_hal_msp.c.

825{
826 if(htim_base->Instance==TIM6)
827 {
828 /* USER CODE BEGIN TIM6_MspDeInit 0 */
829
830 /* USER CODE END TIM6_MspDeInit 0 */
831 /* Peripheral clock disable */
832 __HAL_RCC_TIM6_CLK_DISABLE();
833
834 /* TIM6 interrupt DeInit */
835 HAL_NVIC_DisableIRQ(TIM6_DAC_IRQn);
836 /* USER CODE BEGIN TIM6_MspDeInit 1 */
837
838 /* USER CODE END TIM6_MspDeInit 1 */
839 }
840 else if(htim_base->Instance==TIM7)
841 {
842 /* USER CODE BEGIN TIM7_MspDeInit 0 */
843
844 /* USER CODE END TIM7_MspDeInit 0 */
845 /* Peripheral clock disable */
846 __HAL_RCC_TIM7_CLK_DISABLE();
847
848 /* TIM7 interrupt DeInit */
849 HAL_NVIC_DisableIRQ(TIM7_IRQn);
850 /* USER CODE BEGIN TIM7_MspDeInit 1 */
851
852 /* USER CODE END TIM7_MspDeInit 1 */
853 }
854 else if(htim_base->Instance==TIM13)
855 {
856 /* USER CODE BEGIN TIM13_MspDeInit 0 */
857
858 /* USER CODE END TIM13_MspDeInit 0 */
859 /* Peripheral clock disable */
860 __HAL_RCC_TIM13_CLK_DISABLE();
861
862 /* TIM13 interrupt DeInit */
863 HAL_NVIC_DisableIRQ(TIM8_UP_TIM13_IRQn);
864 /* USER CODE BEGIN TIM13_MspDeInit 1 */
865
866 /* USER CODE END TIM13_MspDeInit 1 */
867 }
868
869}

◆ HAL_TIM_Base_MspInit()

void HAL_TIM_Base_MspInit ( TIM_HandleTypeDef *  htim_base)

TIM_Base MSP Initialization This function configures the hardware resources used in this example.

Parameters
htim_baseTIM_Base handle pointer
Return values
None

Definition at line 692 of file stm32h7xx_hal_msp.c.

693{
694 if(htim_base->Instance==TIM6)
695 {
696 /* USER CODE BEGIN TIM6_MspInit 0 */
697
698 /* USER CODE END TIM6_MspInit 0 */
699 /* Peripheral clock enable */
700 __HAL_RCC_TIM6_CLK_ENABLE();
701 /* TIM6 interrupt Init */
702 HAL_NVIC_SetPriority(TIM6_DAC_IRQn, 5, 0);
703 HAL_NVIC_EnableIRQ(TIM6_DAC_IRQn);
704 /* USER CODE BEGIN TIM6_MspInit 1 */
705
706 /* USER CODE END TIM6_MspInit 1 */
707 }
708 else if(htim_base->Instance==TIM7)
709 {
710 /* USER CODE BEGIN TIM7_MspInit 0 */
711
712 /* USER CODE END TIM7_MspInit 0 */
713 /* Peripheral clock enable */
714 __HAL_RCC_TIM7_CLK_ENABLE();
715 /* TIM7 interrupt Init */
716 HAL_NVIC_SetPriority(TIM7_IRQn, 15, 0);
717 HAL_NVIC_EnableIRQ(TIM7_IRQn);
718 /* USER CODE BEGIN TIM7_MspInit 1 */
719
720 /* USER CODE END TIM7_MspInit 1 */
721 }
722 else if(htim_base->Instance==TIM13)
723 {
724 /* USER CODE BEGIN TIM13_MspInit 0 */
725
726 /* USER CODE END TIM13_MspInit 0 */
727 /* Peripheral clock enable */
728 __HAL_RCC_TIM13_CLK_ENABLE();
729 /* TIM13 interrupt Init */
730 HAL_NVIC_SetPriority(TIM8_UP_TIM13_IRQn, 14, 0);
731 HAL_NVIC_EnableIRQ(TIM8_UP_TIM13_IRQn);
732 /* USER CODE BEGIN TIM13_MspInit 1 */
733
734 /* USER CODE END TIM13_MspInit 1 */
735 }
736
737}

◆ HAL_TIM_MspPostInit()

void HAL_TIM_MspPostInit ( TIM_HandleTypeDef *  htim)

TIM2 GPIO Configuration PA2 ---—> TIM2_CH3

TIM15 GPIO Configuration PE6 ---—> TIM15_CH2

Definition at line 739 of file stm32h7xx_hal_msp.c.

740{
741 GPIO_InitTypeDef GPIO_InitStruct = {0};
742 if(htim->Instance==TIM2)
743 {
744 /* USER CODE BEGIN TIM2_MspPostInit 0 */
745
746 /* USER CODE END TIM2_MspPostInit 0 */
747 __HAL_RCC_GPIOA_CLK_ENABLE();
751 GPIO_InitStruct.Pin = TIM2_CH3_PWM_AIRBRAKES_Pin;
752 GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
753 GPIO_InitStruct.Pull = GPIO_NOPULL;
754 GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
755 GPIO_InitStruct.Alternate = GPIO_AF1_TIM2;
756 HAL_GPIO_Init(TIM2_CH3_PWM_AIRBRAKES_GPIO_Port, &GPIO_InitStruct);
757
758 /* USER CODE BEGIN TIM2_MspPostInit 1 */
759
760 /* USER CODE END TIM2_MspPostInit 1 */
761 }
762 else if(htim->Instance==TIM15)
763 {
764 /* USER CODE BEGIN TIM15_MspPostInit 0 */
765
766 /* USER CODE END TIM15_MspPostInit 0 */
767
768 __HAL_RCC_GPIOE_CLK_ENABLE();
772 GPIO_InitStruct.Pin = TIM15_CH2_BUZZER_Pin;
773 GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
774 GPIO_InitStruct.Pull = GPIO_NOPULL;
775 GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
776 GPIO_InitStruct.Alternate = GPIO_AF4_TIM15;
777 HAL_GPIO_Init(TIM15_CH2_BUZZER_GPIO_Port, &GPIO_InitStruct);
778
779 /* USER CODE BEGIN TIM15_MspPostInit 1 */
780
781 /* USER CODE END TIM15_MspPostInit 1 */
782 }
783
784}

Referenced by MX_TIM15_Init(), and MX_TIM2_Init().

Here is the caller graph for this function:

◆ HAL_TIM_PWM_MspDeInit()

void HAL_TIM_PWM_MspDeInit ( TIM_HandleTypeDef *  htim_pwm)

TIM_PWM MSP De-Initialization This function freeze the hardware resources used in this example.

Parameters
htim_pwmTIM_PWM handle pointer
Return values
None

Definition at line 791 of file stm32h7xx_hal_msp.c.

792{
793 if(htim_pwm->Instance==TIM2)
794 {
795 /* USER CODE BEGIN TIM2_MspDeInit 0 */
796
797 /* USER CODE END TIM2_MspDeInit 0 */
798 /* Peripheral clock disable */
799 __HAL_RCC_TIM2_CLK_DISABLE();
800 /* USER CODE BEGIN TIM2_MspDeInit 1 */
801
802 /* USER CODE END TIM2_MspDeInit 1 */
803 }
804 else if(htim_pwm->Instance==TIM15)
805 {
806 /* USER CODE BEGIN TIM15_MspDeInit 0 */
807
808 /* USER CODE END TIM15_MspDeInit 0 */
809 /* Peripheral clock disable */
810 __HAL_RCC_TIM15_CLK_DISABLE();
811 /* USER CODE BEGIN TIM15_MspDeInit 1 */
812
813 /* USER CODE END TIM15_MspDeInit 1 */
814 }
815
816}

◆ HAL_TIM_PWM_MspInit()

void HAL_TIM_PWM_MspInit ( TIM_HandleTypeDef *  htim_pwm)

TIM_PWM MSP Initialization This function configures the hardware resources used in this example.

Parameters
htim_pwmTIM_PWM handle pointer
Return values
None

Definition at line 659 of file stm32h7xx_hal_msp.c.

660{
661 if(htim_pwm->Instance==TIM2)
662 {
663 /* USER CODE BEGIN TIM2_MspInit 0 */
664
665 /* USER CODE END TIM2_MspInit 0 */
666 /* Peripheral clock enable */
667 __HAL_RCC_TIM2_CLK_ENABLE();
668 /* USER CODE BEGIN TIM2_MspInit 1 */
669
670 /* USER CODE END TIM2_MspInit 1 */
671 }
672 else if(htim_pwm->Instance==TIM15)
673 {
674 /* USER CODE BEGIN TIM15_MspInit 0 */
675
676 /* USER CODE END TIM15_MspInit 0 */
677 /* Peripheral clock enable */
678 __HAL_RCC_TIM15_CLK_ENABLE();
679 /* USER CODE BEGIN TIM15_MspInit 1 */
680
681 /* USER CODE END TIM15_MspInit 1 */
682 }
683
684}

◆ HAL_UART_MspDeInit()

void HAL_UART_MspDeInit ( UART_HandleTypeDef *  huart)

UART MSP De-Initialization This function freeze the hardware resources used in this example.

Parameters
huartUART handle pointer
Return values
None

UART4 GPIO Configuration PD0 ---—> UART4_RX PD1 ---—> UART4_TX

USART1 GPIO Configuration PA8 ---—> USART1_CK PA9 ---—> USART1_TX PA10 ---—> USART1_RX

Definition at line 1009 of file stm32h7xx_hal_msp.c.

1010{
1011 if(huart->Instance==UART4)
1012 {
1013 /* USER CODE BEGIN UART4_MspDeInit 0 */
1014
1015 /* USER CODE END UART4_MspDeInit 0 */
1016 /* Peripheral clock disable */
1017 __HAL_RCC_UART4_CLK_DISABLE();
1018
1023 HAL_GPIO_DeInit(GPIOD, UART4_RX_DEBUG_Pin|UART4_TX_DEBUG_Pin);
1024
1025 /* USER CODE BEGIN UART4_MspDeInit 1 */
1026
1027 /* USER CODE END UART4_MspDeInit 1 */
1028 }
1029 else if(huart->Instance==USART1)
1030 {
1031 /* USER CODE BEGIN USART1_MspDeInit 0 */
1032
1033 /* USER CODE END USART1_MspDeInit 0 */
1034 /* Peripheral clock disable */
1035 __HAL_RCC_USART1_CLK_DISABLE();
1036
1042 HAL_GPIO_DeInit(GPIOA, GPIO_PIN_8|GPIO_PIN_9|GPIO_PIN_10);
1043
1044 /* USART1 DMA DeInit */
1045 HAL_DMA_DeInit(huart->hdmarx);
1046 HAL_DMA_DeInit(huart->hdmatx);
1047
1048 /* USART1 interrupt DeInit */
1049 HAL_NVIC_DisableIRQ(USART1_IRQn);
1050 /* USER CODE BEGIN USART1_MspDeInit 1 */
1051
1052 /* USER CODE END USART1_MspDeInit 1 */
1053 }
1054
1055}

◆ HAL_UART_MspInit()

void HAL_UART_MspInit ( UART_HandleTypeDef *  huart)

UART MSP Initialization This function configures the hardware resources used in this example.

Parameters
huartUART handle pointer
Return values
None

Initializes the peripherals clock

UART4 GPIO Configuration PD0 ---—> UART4_RX PD1 ---—> UART4_TX

Initializes the peripherals clock

USART1 GPIO Configuration PA8 ---—> USART1_CK PA9 ---—> USART1_TX PA10 ---—> USART1_RX

Definition at line 877 of file stm32h7xx_hal_msp.c.

878{
879 GPIO_InitTypeDef GPIO_InitStruct = {0};
880 RCC_PeriphCLKInitTypeDef PeriphClkInitStruct = {0};
881 if(huart->Instance==UART4)
882 {
883 /* USER CODE BEGIN UART4_MspInit 0 */
884
885 /* USER CODE END UART4_MspInit 0 */
886
889 PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_UART4;
890 PeriphClkInitStruct.Usart234578ClockSelection = RCC_USART234578CLKSOURCE_D2PCLK1;
891 if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK)
892 {
894 }
895
896 /* Peripheral clock enable */
897 __HAL_RCC_UART4_CLK_ENABLE();
898
899 __HAL_RCC_GPIOD_CLK_ENABLE();
904 GPIO_InitStruct.Pin = UART4_RX_DEBUG_Pin|UART4_TX_DEBUG_Pin;
905 GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
906 GPIO_InitStruct.Pull = GPIO_NOPULL;
907 GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
908 GPIO_InitStruct.Alternate = GPIO_AF8_UART4;
909 HAL_GPIO_Init(GPIOD, &GPIO_InitStruct);
910
911 /* USER CODE BEGIN UART4_MspInit 1 */
912
913 /* USER CODE END UART4_MspInit 1 */
914 }
915 else if(huart->Instance==USART1)
916 {
917 /* USER CODE BEGIN USART1_MspInit 0 */
918
919 /* USER CODE END USART1_MspInit 0 */
920
923 PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_USART1;
924 PeriphClkInitStruct.Usart16ClockSelection = RCC_USART16CLKSOURCE_D2PCLK2;
925 if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK)
926 {
928 }
929
930 /* Peripheral clock enable */
931 __HAL_RCC_USART1_CLK_ENABLE();
932
933 __HAL_RCC_GPIOA_CLK_ENABLE();
939 GPIO_InitStruct.Pin = GPIO_PIN_8;
940 GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
941 GPIO_InitStruct.Pull = GPIO_NOPULL;
942 GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
943 GPIO_InitStruct.Alternate = GPIO_AF7_USART1;
944 HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
945
946 GPIO_InitStruct.Pin = GPIO_PIN_9|GPIO_PIN_10;
947 GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
948 GPIO_InitStruct.Pull = GPIO_NOPULL;
949 GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
950 GPIO_InitStruct.Alternate = GPIO_AF7_USART1;
951 HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
952
953 /* USART1 DMA Init */
954 /* USART1_RX Init */
955 hdma_usart1_rx.Instance = DMA1_Stream0;
956 hdma_usart1_rx.Init.Request = DMA_REQUEST_USART1_RX;
957 hdma_usart1_rx.Init.Direction = DMA_PERIPH_TO_MEMORY;
958 hdma_usart1_rx.Init.PeriphInc = DMA_PINC_DISABLE;
959 hdma_usart1_rx.Init.MemInc = DMA_MINC_ENABLE;
960 hdma_usart1_rx.Init.PeriphDataAlignment = DMA_PDATAALIGN_BYTE;
961 hdma_usart1_rx.Init.MemDataAlignment = DMA_MDATAALIGN_BYTE;
962 hdma_usart1_rx.Init.Mode = DMA_NORMAL;
963 hdma_usart1_rx.Init.Priority = DMA_PRIORITY_HIGH;
964 hdma_usart1_rx.Init.FIFOMode = DMA_FIFOMODE_ENABLE;
965 hdma_usart1_rx.Init.FIFOThreshold = DMA_FIFO_THRESHOLD_FULL;
966 hdma_usart1_rx.Init.MemBurst = DMA_MBURST_SINGLE;
967 hdma_usart1_rx.Init.PeriphBurst = DMA_PBURST_SINGLE;
968 if (HAL_DMA_Init(&hdma_usart1_rx) != HAL_OK)
969 {
971 }
972
973 __HAL_LINKDMA(huart,hdmarx,hdma_usart1_rx);
974
975 /* USART1_TX Init */
976 hdma_usart1_tx.Instance = DMA1_Stream1;
977 hdma_usart1_tx.Init.Request = DMA_REQUEST_USART1_TX;
978 hdma_usart1_tx.Init.Direction = DMA_MEMORY_TO_PERIPH;
979 hdma_usart1_tx.Init.PeriphInc = DMA_PINC_DISABLE;
980 hdma_usart1_tx.Init.MemInc = DMA_MINC_ENABLE;
981 hdma_usart1_tx.Init.PeriphDataAlignment = DMA_PDATAALIGN_BYTE;
982 hdma_usart1_tx.Init.MemDataAlignment = DMA_MDATAALIGN_BYTE;
983 hdma_usart1_tx.Init.Mode = DMA_NORMAL;
984 hdma_usart1_tx.Init.Priority = DMA_PRIORITY_HIGH;
985 hdma_usart1_tx.Init.FIFOMode = DMA_FIFOMODE_DISABLE;
986 if (HAL_DMA_Init(&hdma_usart1_tx) != HAL_OK)
987 {
989 }
990
991 __HAL_LINKDMA(huart,hdmatx,hdma_usart1_tx);
992
993 /* USART1 interrupt Init */
994 HAL_NVIC_SetPriority(USART1_IRQn, 10, 0);
995 HAL_NVIC_EnableIRQ(USART1_IRQn);
996 /* USER CODE BEGIN USART1_MspInit 1 */
997
998 /* USER CODE END USART1_MspInit 1 */
999 }
1000
1001}
DMA_HandleTypeDef hdma_usart1_rx
Definition main.c:73
DMA_HandleTypeDef hdma_usart1_tx
Definition main.c:74

References Error_Handler(), HAL_OK, hdma_usart1_rx, and hdma_usart1_tx.

Here is the call graph for this function:

Variable Documentation

◆ HAL_RCC_ADC12_CLK_ENABLED

uint32_t HAL_RCC_ADC12_CLK_ENABLED =0
static

Definition at line 88 of file stm32h7xx_hal_msp.c.

Referenced by HAL_ADC_MspDeInit(), and HAL_ADC_MspInit().

◆ hdma_usart1_rx

DMA_HandleTypeDef hdma_usart1_rx
extern

Definition at line 73 of file main.c.

Referenced by HAL_UART_MspInit().

◆ hdma_usart1_tx

DMA_HandleTypeDef hdma_usart1_tx
extern

Definition at line 74 of file main.c.

Referenced by HAL_UART_MspInit().

◆ hmdma_quadspi_fifo_th

MDMA_HandleTypeDef hmdma_quadspi_fifo_th
extern

Definition at line 59 of file main.c.

Referenced by HAL_QSPI_MspInit().