text: /* USER CODE BEGIN Header */
  /**
    ******************************************************************************
    * @file    stm32l4xx_it.c
    * @brief   Interrupt Service Routines.
    ******************************************************************************
    * @attention
    *
    * <h2><center>&copy; Copyright (c) 2021 STMicroelectronics.
    * All rights reserved.</center></h2>
    *
    * This software component is licensed by ST under BSD 3-Clause license,
    * the "License"; You may not use this file except in compliance with the
    * License. You may obtain a copy of the License at:
    *                        opensource.org/licenses/BSD-3-Clause
    *
    ******************************************************************************
    */
  /* USER CODE END Header */
  
  /* Includes ------------------------------------------------------------------*/
  #include "main.h"
  #include "stm32l4xx_it.h"
  /* Private includes ----------------------------------------------------------*/
  /* USER CODE BEGIN Includes */
  /* USER CODE END Includes */
  
  /* Private typedef -----------------------------------------------------------*/
  /* USER CODE BEGIN TD */
  
  /* USER CODE END TD */
  
  /* Private define ------------------------------------------------------------*/
  /* USER CODE BEGIN PD */
  
  /* USER CODE END PD */
  
  /* Private macro -------------------------------------------------------------*/
  /* USER CODE BEGIN PM */
  
  /* USER CODE END PM */
  
  /* Private variables ---------------------------------------------------------*/
  /* USER CODE BEGIN PV */
  
  /* USER CODE END PV */
  
  /* Private function prototypes -----------------------------------------------*/
  /* USER CODE BEGIN PFP */
  
  /* USER CODE END PFP */
  
  /* Private user code ---------------------------------------------------------*/
  /* USER CODE BEGIN 0 */
  
  /* USER CODE END 0 */
  
  /* External variables --------------------------------------------------------*/
  extern CAN_HandleTypeDef hcan1;
  extern LPTIM_HandleTypeDef hlptim1;
  extern DMA_HandleTypeDef hdma_sai1_a;
  extern DMA_HandleTypeDef hdma_sdmmc1;
  extern SD_HandleTypeDef hsd1;
  extern TIM_HandleTypeDef htim2;
  extern TIM_HandleTypeDef htim3;
  extern TIM_HandleTypeDef htim4;
  extern TIM_HandleTypeDef htim15;
  extern TIM_HandleTypeDef htim16;
  extern TIM_HandleTypeDef htim17;
  extern DMA_HandleTypeDef hdma_usart2_rx;
  extern UART_HandleTypeDef huart1;
  extern UART_HandleTypeDef huart2;
  extern PCD_HandleTypeDef hpcd_USB_OTG_FS;
  /* USER CODE BEGIN EV */
  
  /* USER CODE END EV */
  #ifdef HAL_UART_MODULE_ENABLED
  int HAL_USART_IDLE_PROCESS(UART_HandleTypeDef *huart);
  #endif
  
  /******************************************************************************/
  /*           Cortex-M4 Processor Interruption and Exception Handlers          */
  /******************************************************************************/
  /**
    * @brief This function handles System tick timer.
    */
  void SysTick_Handler(void)
  {
    /* USER CODE BEGIN SysTick_IRQn 0 */
  
    /* USER CODE END SysTick_IRQn 0 */
    HAL_IncTick();
    /* USER CODE BEGIN SysTick_IRQn 1 */
  
    /* USER CODE END SysTick_IRQn 1 */
  }
  
  /******************************************************************************/
  /* STM32L4xx Peripheral Interrupt Handlers                                    */
  /* Add here the Interrupt Handlers for the used peripherals.                  */
  /* For the available peripheral interrupt handler names,                      */
  /* please refer to the startup file (startup_stm32l4xx.s).                    */
  /******************************************************************************/
  
  /**
    * @brief This function handles DMA1 channel6 global interrupt.
    */
  void DMA1_Channel6_IRQHandler(void)
  {
    /* USER CODE BEGIN DMA1_Channel6_IRQn 0 */
  
    /* USER CODE END DMA1_Channel6_IRQn 0 */
    HAL_DMA_IRQHandler(&hdma_usart2_rx);
    /* USER CODE BEGIN DMA1_Channel6_IRQn 1 */
  
    /* USER CODE END DMA1_Channel6_IRQn 1 */
  }
  
  /**
    * @brief This function handles CAN1 TX interrupt.
    */
  void CAN1_TX_IRQHandler(void)
  {
    /* USER CODE BEGIN CAN1_TX_IRQn 0 */
  
    /* USER CODE END CAN1_TX_IRQn 0 */
    HAL_CAN_IRQHandler(&hcan1);
    /* USER CODE BEGIN CAN1_TX_IRQn 1 */
  
    /* USER CODE END CAN1_TX_IRQn 1 */
  }
  
  /**
    * @brief This function handles CAN1 RX0 interrupt.
    */
  void CAN1_RX0_IRQHandler(void)
  {
    /* USER CODE BEGIN CAN1_RX0_IRQn 0 */
  
    /* USER CODE END CAN1_RX0_IRQn 0 */
    HAL_CAN_IRQHandler(&hcan1);
    /* USER CODE BEGIN CAN1_RX0_IRQn 1 */
  
    /* USER CODE END CAN1_RX0_IRQn 1 */
  }
  
  /**
    * @brief This function handles CAN1 RX1 interrupt.
    */
  void CAN1_RX1_IRQHandler(void)
  {
    /* USER CODE BEGIN CAN1_RX1_IRQn 0 */
  
    /* USER CODE END CAN1_RX1_IRQn 0 */
    HAL_CAN_IRQHandler(&hcan1);
    /* USER CODE BEGIN CAN1_RX1_IRQn 1 */
  
    /* USER CODE END CAN1_RX1_IRQn 1 */
  }
  
  /**
    * @brief This function handles CAN1 SCE interrupt.
    */
  void CAN1_SCE_IRQHandler(void)
  {
    /* USER CODE BEGIN CAN1_SCE_IRQn 0 */
  
    /* USER CODE END CAN1_SCE_IRQn 0 */
    HAL_CAN_IRQHandler(&hcan1);
    /* USER CODE BEGIN CAN1_SCE_IRQn 1 */
  
    /* USER CODE END CAN1_SCE_IRQn 1 */
  }
  
  /**
    * @brief This function handles TIM1 break interrupt and TIM15 global interrupt.
    */
  void TIM1_BRK_TIM15_IRQHandler(void)
  {
    /* USER CODE BEGIN TIM1_BRK_TIM15_IRQn 0 */
  
    /* USER CODE END TIM1_BRK_TIM15_IRQn 0 */
    HAL_TIM_IRQHandler(&htim15);
    /* USER CODE BEGIN TIM1_BRK_TIM15_IRQn 1 */
  
    /* USER CODE END TIM1_BRK_TIM15_IRQn 1 */
  }
  
  /**
    * @brief This function handles TIM1 update interrupt and TIM16 global interrupt.
    */
  void TIM1_UP_TIM16_IRQHandler(void)
  {
    /* USER CODE BEGIN TIM1_UP_TIM16_IRQn 0 */
  
    /* USER CODE END TIM1_UP_TIM16_IRQn 0 */
    HAL_TIM_IRQHandler(&htim16);
    /* USER CODE BEGIN TIM1_UP_TIM16_IRQn 1 */
  
    /* USER CODE END TIM1_UP_TIM16_IRQn 1 */
  }
  
  /**
    * @brief This function handles TIM1 trigger and commutation interrupts and TIM17 global interrupt.
    */
  void TIM1_TRG_COM_TIM17_IRQHandler(void)
  {
    /* USER CODE BEGIN TIM1_TRG_COM_TIM17_IRQn 0 */
  
    /* USER CODE END TIM1_TRG_COM_TIM17_IRQn 0 */
    HAL_TIM_IRQHandler(&htim17);
    /* USER CODE BEGIN TIM1_TRG_COM_TIM17_IRQn 1 */
  
    /* USER CODE END TIM1_TRG_COM_TIM17_IRQn 1 */
  }
  
  /**
    * @brief This function handles TIM2 global interrupt.
    */
  void TIM2_IRQHandler(void)
  {
    /* USER CODE BEGIN TIM2_IRQn 0 */
  
    /* USER CODE END TIM2_IRQn 0 */
    HAL_TIM_IRQHandler(&htim2);
    /* USER CODE BEGIN TIM2_IRQn 1 */
  
    /* USER CODE END TIM2_IRQn 1 */
  }
  
  /**
    * @brief This function handles TIM3 global interrupt.
    */
  void TIM3_IRQHandler(void)
  {
    /* USER CODE BEGIN TIM3_IRQn 0 */
  
    /* USER CODE END TIM3_IRQn 0 */
    HAL_TIM_IRQHandler(&htim3);
    /* USER CODE BEGIN TIM3_IRQn 1 */
  
    /* USER CODE END TIM3_IRQn 1 */
  }
  
  /**
    * @brief This function handles TIM4 global interrupt.
    */
  void TIM4_IRQHandler(void)
  {
    /* USER CODE BEGIN TIM4_IRQn 0 */
  
    /* USER CODE END TIM4_IRQn 0 */
    HAL_TIM_IRQHandler(&htim4);
    /* USER CODE BEGIN TIM4_IRQn 1 */
  
    /* USER CODE END TIM4_IRQn 1 */
  }
  
  /**
    * @brief This function handles USART1 global interrupt.
    */
  void USART1_IRQHandler(void)
  {
    /* USER CODE BEGIN USART1_IRQn 0 */
  
    /* USER CODE END USART1_IRQn 0 */
    if (HAL_USART_IDLE_PROCESS(&huart1))
      return;
    
    HAL_UART_IRQHandler(&huart1);
    /* USER CODE BEGIN USART1_IRQn 1 */
  
    /* USER CODE END USART1_IRQn 1 */
  }
  
  /**
    * @brief This function handles USART2 global interrupt.
    */
  void USART2_IRQHandler(void)
  {
    /* USER CODE BEGIN USART2_IRQn 0 */
  
    /* USER CODE END USART2_IRQn 0 */
    if (HAL_USART_IDLE_PROCESS(&huart2))
      return;
    
    HAL_UART_IRQHandler(&huart2);
    /* USER CODE BEGIN USART2_IRQn 1 */
  
    /* USER CODE END USART2_IRQn 1 */
  }
  
  /**
    * @brief This function handles SDMMC1 global interrupt.
    */
  void SDMMC1_IRQHandler_remove(void)
  {
    /* USER CODE BEGIN SDMMC1_IRQn 0 */
  
    /* USER CODE END SDMMC1_IRQn 0 */
    HAL_SD_IRQHandler(&hsd1);
    /* USER CODE BEGIN SDMMC1_IRQn 1 */
  
    /* USER CODE END SDMMC1_IRQn 1 */
  }
  
  /**
    * @brief This function handles DMA2 channel1 global interrupt.
    */
  void DMA2_Channel1_IRQHandler(void)
  {
    /* USER CODE BEGIN DMA2_Channel1_IRQn 0 */
  
    /* USER CODE END DMA2_Channel1_IRQn 0 */
    HAL_DMA_IRQHandler(&hdma_sai1_a);
    /* USER CODE BEGIN DMA2_Channel1_IRQn 1 */
  
    /* USER CODE END DMA2_Channel1_IRQn 1 */
  }
  
  /**
    * @brief This function handles DMA2 channel4 global interrupt.
    */
  void DMA2_Channel4_IRQHandler(void)
  {
    /* USER CODE BEGIN DMA2_Channel4_IRQn 0 */
  
    /* USER CODE END DMA2_Channel4_IRQn 0 */
    HAL_DMA_IRQHandler(&hdma_sdmmc1);
    /* USER CODE BEGIN DMA2_Channel4_IRQn 1 */
  
    /* USER CODE END DMA2_Channel4_IRQn 1 */
  }
  
  /**
    * @brief This function handles LPTIM1 global interrupt.
    */
  void LPTIM1_IRQHandler(void)
  {
    /* USER CODE BEGIN LPTIM1_IRQn 0 */
  
    /* USER CODE END LPTIM1_IRQn 0 */
    HAL_LPTIM_IRQHandler(&hlptim1);
    /* USER CODE BEGIN LPTIM1_IRQn 1 */
  
    /* USER CODE END LPTIM1_IRQn 1 */
  }
  
  /**
    * @brief This function handles USB OTG FS global interrupt.
    */
  void OTG_FS_IRQHandler(void)
  {
    /* USER CODE BEGIN OTG_FS_IRQn 0 */
  
    /* USER CODE END OTG_FS_IRQn 0 */
    HAL_PCD_IRQHandler(&hpcd_USB_OTG_FS);
    /* USER CODE BEGIN OTG_FS_IRQn 1 */
  
    /* USER CODE END OTG_FS_IRQn 1 */
  }
  
  /* USER CODE BEGIN 1 */
  
  /* USER CODE END 1 */
  /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
  