Prusa MINI Firmware overview
stm32f4xx_hal_msp.c File Reference
#include "main.h"

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. More...
 
void HAL_ADC_MspDeInit (ADC_HandleTypeDef *hadc)
 ADC MSP De-Initialization This function freeze the hardware resources used in this example. More...
 
void HAL_I2C_MspInit (I2C_HandleTypeDef *hi2c)
 I2C MSP Initialization This function configures the hardware resources used in this example. More...
 
void HAL_I2C_MspDeInit (I2C_HandleTypeDef *hi2c)
 I2C MSP De-Initialization This function freeze the hardware resources used in this example. More...
 
void HAL_SPI_MspInit (SPI_HandleTypeDef *hspi)
 SPI MSP Initialization This function configures the hardware resources used in this example. More...
 
void HAL_SPI_MspDeInit (SPI_HandleTypeDef *hspi)
 SPI MSP De-Initialization This function freeze the hardware resources used in this example. More...
 
void HAL_TIM_Base_MspInit (TIM_HandleTypeDef *htim_base)
 TIM_Base MSP Initialization This function configures the hardware resources used in this example. More...
 
void HAL_TIM_Base_MspDeInit (TIM_HandleTypeDef *htim_base)
 TIM_Base MSP De-Initialization This function freeze the hardware resources used in this example. More...
 
void HAL_UART_MspInit (UART_HandleTypeDef *huart)
 UART MSP Initialization This function configures the hardware resources used in this example. More...
 
void HAL_UART_MspDeInit (UART_HandleTypeDef *huart)
 UART MSP De-Initialization This function freeze the hardware resources used in this example. More...
 

Variables

DMA_HandleTypeDef hdma_spi2_tx
 
DMA_HandleTypeDef hdma_usart1_rx
 
DMA_HandleTypeDef hdma_usart2_rx
 
DMA_HandleTypeDef hdma_usart6_rx
 

Function Documentation

◆ HAL_TIM_MspPostInit()

void HAL_TIM_MspPostInit ( TIM_HandleTypeDef htim)

TIM1 GPIO Configuration PE9 ---—> TIM1_CH1 PE11 ---—> TIM1_CH2

TIM2 GPIO Configuration PA0-WKUP ---—> TIM2_CH1

TIM3 GPIO Configuration PB0 ---—> TIM3_CH3 PB1 ---—> TIM3_CH4

430  {
431 
432  GPIO_InitTypeDef GPIO_InitStruct = { 0 };
433  if (htim->Instance == TIM1) {
434  /* USER CODE BEGIN TIM1_MspPostInit 0 */
435 
436  /* USER CODE END TIM1_MspPostInit 0 */
437  __HAL_RCC_GPIOE_CLK_ENABLE();
438  /**TIM1 GPIO Configuration
439  PE9 ------> TIM1_CH1
440  PE11 ------> TIM1_CH2
441  */
442  GPIO_InitStruct.Pin = FAN1_Pin | FAN0_Pin;
443  GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
444  GPIO_InitStruct.Pull = GPIO_NOPULL;
445  GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
446  GPIO_InitStruct.Alternate = GPIO_AF1_TIM1;
447  HAL_GPIO_Init(GPIOE, &GPIO_InitStruct);
448 
449  /* USER CODE BEGIN TIM1_MspPostInit 1 */
450 
451  /* USER CODE END TIM1_MspPostInit 1 */
452  } else if (htim->Instance == TIM2) {
453  /* USER CODE BEGIN TIM2_MspPostInit 0 */
454 
455  /* USER CODE END TIM2_MspPostInit 0 */
456 
458  /**TIM2 GPIO Configuration
459  PA0-WKUP ------> TIM2_CH1
460  */
461  GPIO_InitStruct.Pin = BUZZER_Pin;
462  GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
463  GPIO_InitStruct.Pull = GPIO_NOPULL;
464  GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
465  GPIO_InitStruct.Alternate = GPIO_AF1_TIM2;
466  HAL_GPIO_Init(BUZZER_GPIO_Port, &GPIO_InitStruct);
467 
468  /* USER CODE BEGIN TIM2_MspPostInit 1 */
469 
470  /* USER CODE END TIM2_MspPostInit 1 */
471  } else if (htim->Instance == TIM3) {
472  /* USER CODE BEGIN TIM3_MspPostInit 0 */
473 
474  /* USER CODE END TIM3_MspPostInit 0 */
475 
477  /**TIM3 GPIO Configuration
478  PB0 ------> TIM3_CH3
479  PB1 ------> TIM3_CH4
480  */
481  GPIO_InitStruct.Pin = BED_HEAT_Pin | HEAT0_Pin;
482  GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
483  GPIO_InitStruct.Pull = GPIO_NOPULL;
484  GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
485  GPIO_InitStruct.Alternate = GPIO_AF2_TIM3;
486  HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
487 
488  /* USER CODE BEGIN TIM3_MspPostInit 1 */
489 
490  /* USER CODE END TIM3_MspPostInit 1 */
491  }
492 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ HAL_MspInit()

void HAL_MspInit ( void  )

Initializes the Global MSP.

93  {
94  /* USER CODE BEGIN MspInit 0 */
95 
96  /* USER CODE END MspInit 0 */
97 
100 
101  /* System interrupt init*/
102  /* PendSV_IRQn interrupt configuration */
103  HAL_NVIC_SetPriority(PendSV_IRQn, 15, 0);
104 
105  /* USER CODE BEGIN MspInit 1 */
106 
107  /* USER CODE END MspInit 1 */
108 }
Here is the call graph for this function:

Variable Documentation

◆ hdma_spi2_tx

DMA_HandleTypeDef hdma_spi2_tx

File Name : stm32f4xx_hal_msp.c Description : This file provides code for the MSP Initialization and de-Initialization codes.

This notice applies to any and all portions of this file that are not between comment pairs USER CODE BEGIN and USER CODE END. Other portions of this file, whether inserted by the user or by software development tools are owned by their respective copyright owners.

COPYRIGHT(c) 2019 STMicroelectronics

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  3. Neither the name of STMicroelectronics nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

◆ hdma_usart1_rx

DMA_HandleTypeDef hdma_usart1_rx

◆ hdma_usart2_rx

DMA_HandleTypeDef hdma_usart2_rx

◆ hdma_usart6_rx

DMA_HandleTypeDef hdma_usart6_rx
GPIO_MODE_AF_PP
#define GPIO_MODE_AF_PP
Definition: stm32f4xx_hal_gpio.h:138
BUZZER_GPIO_Port
#define BUZZER_GPIO_Port
Definition: main.h:100
FAN1_Pin
#define FAN1_Pin
Definition: main.h:115
GPIO_InitTypeDef::Mode
uint32_t Mode
Definition: stm32f4xx_hal_gpio.h:68
__HAL_RCC_GPIOB_CLK_ENABLE
#define __HAL_RCC_GPIOB_CLK_ENABLE()
Definition: stm32f4xx_hal_rcc.h:409
GPIO_InitTypeDef::Alternate
uint32_t Alternate
Definition: stm32f4xx_hal_gpio.h:77
GPIO_InitTypeDef::Pull
uint32_t Pull
Definition: stm32f4xx_hal_gpio.h:71
__HAL_RCC_SYSCFG_CLK_ENABLE
#define __HAL_RCC_SYSCFG_CLK_ENABLE()
Definition: stm32f4xx_hal_rcc.h:615
BUZZER_Pin
#define BUZZER_Pin
Definition: main.h:99
BED_HEAT_Pin
#define BED_HEAT_Pin
Definition: main.h:109
HAL_GPIO_Init
void HAL_GPIO_Init(GPIO_TypeDef *GPIOx, GPIO_InitTypeDef *GPIO_Init)
HAL_NVIC_SetPriority
void HAL_NVIC_SetPriority(IRQn_Type IRQn, uint32_t PreemptPriority, uint32_t SubPriority)
GPIO_NOPULL
#define GPIO_NOPULL
Definition: stm32f4xx_hal_gpio.h:170
TIM_HandleTypeDef::Instance
TIM_TypeDef * Instance
Definition: stm32f4xx_hal_tim.h:289
GPIO_InitTypeDef::Pin
uint32_t Pin
Definition: stm32f4xx_hal_gpio.h:65
__HAL_RCC_PWR_CLK_ENABLE
#define __HAL_RCC_PWR_CLK_ENABLE()
Definition: stm32f4xx_hal_rcc.h:528
GPIO_InitTypeDef::Speed
uint32_t Speed
Definition: stm32f4xx_hal_gpio.h:74
HEAT0_Pin
#define HEAT0_Pin
Definition: main.h:111
__HAL_RCC_GPIOA_CLK_ENABLE
#define __HAL_RCC_GPIOA_CLK_ENABLE()
Definition: stm32f4xx_hal_rcc.h:402
GPIO_InitTypeDef
GPIO Init structure definition.
Definition: stm32f4xx_hal_gpio.h:63
FAN0_Pin
#define FAN0_Pin
Definition: main.h:120
GPIO_SPEED_FREQ_LOW
#define GPIO_SPEED_FREQ_LOW
Definition: stm32f4xx_hal_gpio.h:158