
15 changed files with 16881 additions and 26 deletions
File diff suppressed because one or more lines are too long
@ -0,0 +1,52 @@ |
|||
/* USER CODE BEGIN Header */ |
|||
/**
|
|||
****************************************************************************** |
|||
* @file tim.h |
|||
* @brief This file contains all the function prototypes for |
|||
* the tim.c file |
|||
****************************************************************************** |
|||
* @attention |
|||
* |
|||
* Copyright (c) 2023 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. |
|||
* |
|||
****************************************************************************** |
|||
*/ |
|||
/* USER CODE END Header */ |
|||
/* Define to prevent recursive inclusion -------------------------------------*/ |
|||
#ifndef __TIM_H__ |
|||
#define __TIM_H__ |
|||
|
|||
#ifdef __cplusplus |
|||
extern "C" { |
|||
#endif |
|||
|
|||
/* Includes ------------------------------------------------------------------*/ |
|||
#include "main.h" |
|||
|
|||
/* USER CODE BEGIN Includes */ |
|||
|
|||
/* USER CODE END Includes */ |
|||
|
|||
extern TIM_HandleTypeDef htim2; |
|||
|
|||
/* USER CODE BEGIN Private defines */ |
|||
|
|||
/* USER CODE END Private defines */ |
|||
|
|||
void MX_TIM2_Init(void); |
|||
|
|||
/* USER CODE BEGIN Prototypes */ |
|||
|
|||
/* USER CODE END Prototypes */ |
|||
|
|||
#ifdef __cplusplus |
|||
} |
|||
#endif |
|||
|
|||
#endif /* __TIM_H__ */ |
|||
|
@ -0,0 +1,111 @@ |
|||
/* USER CODE BEGIN Header */ |
|||
/**
|
|||
****************************************************************************** |
|||
* @file tim.c |
|||
* @brief This file provides code for the configuration |
|||
* of the TIM instances. |
|||
****************************************************************************** |
|||
* @attention |
|||
* |
|||
* Copyright (c) 2023 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. |
|||
* |
|||
****************************************************************************** |
|||
*/ |
|||
/* USER CODE END Header */ |
|||
/* Includes ------------------------------------------------------------------*/ |
|||
#include "tim.h" |
|||
|
|||
/* USER CODE BEGIN 0 */ |
|||
|
|||
/* USER CODE END 0 */ |
|||
|
|||
TIM_HandleTypeDef htim2; |
|||
|
|||
/* TIM2 init function */ |
|||
void MX_TIM2_Init(void) |
|||
{ |
|||
|
|||
/* USER CODE BEGIN TIM2_Init 0 */ |
|||
|
|||
/* USER CODE END TIM2_Init 0 */ |
|||
|
|||
TIM_ClockConfigTypeDef sClockSourceConfig = {0}; |
|||
TIM_MasterConfigTypeDef sMasterConfig = {0}; |
|||
|
|||
/* USER CODE BEGIN TIM2_Init 1 */ |
|||
|
|||
/* USER CODE END TIM2_Init 1 */ |
|||
htim2.Instance = TIM2; |
|||
htim2.Init.Prescaler = 0; |
|||
htim2.Init.CounterMode = TIM_COUNTERMODE_UP; |
|||
htim2.Init.Period = 4294967295; |
|||
htim2.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1; |
|||
htim2.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE; |
|||
if (HAL_TIM_Base_Init(&htim2) != HAL_OK) |
|||
{ |
|||
Error_Handler(); |
|||
} |
|||
sClockSourceConfig.ClockSource = TIM_CLOCKSOURCE_INTERNAL; |
|||
if (HAL_TIM_ConfigClockSource(&htim2, &sClockSourceConfig) != HAL_OK) |
|||
{ |
|||
Error_Handler(); |
|||
} |
|||
sMasterConfig.MasterOutputTrigger = TIM_TRGO_RESET; |
|||
sMasterConfig.MasterSlaveMode = TIM_MASTERSLAVEMODE_DISABLE; |
|||
if (HAL_TIMEx_MasterConfigSynchronization(&htim2, &sMasterConfig) != HAL_OK) |
|||
{ |
|||
Error_Handler(); |
|||
} |
|||
/* USER CODE BEGIN TIM2_Init 2 */ |
|||
|
|||
/* USER CODE END TIM2_Init 2 */ |
|||
|
|||
} |
|||
|
|||
void HAL_TIM_Base_MspInit(TIM_HandleTypeDef* tim_baseHandle) |
|||
{ |
|||
|
|||
if(tim_baseHandle->Instance==TIM2) |
|||
{ |
|||
/* USER CODE BEGIN TIM2_MspInit 0 */ |
|||
|
|||
/* USER CODE END TIM2_MspInit 0 */ |
|||
/* TIM2 clock enable */ |
|||
__HAL_RCC_TIM2_CLK_ENABLE(); |
|||
|
|||
/* TIM2 interrupt Init */ |
|||
HAL_NVIC_SetPriority(TIM2_IRQn, 5, 0); |
|||
HAL_NVIC_EnableIRQ(TIM2_IRQn); |
|||
/* USER CODE BEGIN TIM2_MspInit 1 */ |
|||
|
|||
/* USER CODE END TIM2_MspInit 1 */ |
|||
} |
|||
} |
|||
|
|||
void HAL_TIM_Base_MspDeInit(TIM_HandleTypeDef* tim_baseHandle) |
|||
{ |
|||
|
|||
if(tim_baseHandle->Instance==TIM2) |
|||
{ |
|||
/* USER CODE BEGIN TIM2_MspDeInit 0 */ |
|||
|
|||
/* USER CODE END TIM2_MspDeInit 0 */ |
|||
/* Peripheral clock disable */ |
|||
__HAL_RCC_TIM2_CLK_DISABLE(); |
|||
|
|||
/* TIM2 interrupt Deinit */ |
|||
HAL_NVIC_DisableIRQ(TIM2_IRQn); |
|||
/* USER CODE BEGIN TIM2_MspDeInit 1 */ |
|||
|
|||
/* USER CODE END TIM2_MspDeInit 1 */ |
|||
} |
|||
} |
|||
|
|||
/* USER CODE BEGIN 1 */ |
|||
|
|||
/* USER CODE END 1 */ |
File diff suppressed because it is too large
@ -0,0 +1,354 @@ |
|||
/**
|
|||
****************************************************************************** |
|||
* @file stm32f4xx_hal_tim_ex.h |
|||
* @author MCD Application Team |
|||
* @brief Header file of TIM HAL Extended module. |
|||
****************************************************************************** |
|||
* @attention |
|||
* |
|||
* Copyright (c) 2016 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. |
|||
* |
|||
****************************************************************************** |
|||
*/ |
|||
|
|||
/* Define to prevent recursive inclusion -------------------------------------*/ |
|||
#ifndef STM32F4xx_HAL_TIM_EX_H |
|||
#define STM32F4xx_HAL_TIM_EX_H |
|||
|
|||
#ifdef __cplusplus |
|||
extern "C" { |
|||
#endif |
|||
|
|||
/* Includes ------------------------------------------------------------------*/ |
|||
#include "stm32f4xx_hal_def.h" |
|||
|
|||
/** @addtogroup STM32F4xx_HAL_Driver
|
|||
* @{ |
|||
*/ |
|||
|
|||
/** @addtogroup TIMEx
|
|||
* @{ |
|||
*/ |
|||
|
|||
/* Exported types ------------------------------------------------------------*/ |
|||
/** @defgroup TIMEx_Exported_Types TIM Extended Exported Types
|
|||
* @{ |
|||
*/ |
|||
|
|||
/**
|
|||
* @brief TIM Hall sensor Configuration Structure definition |
|||
*/ |
|||
|
|||
typedef struct |
|||
{ |
|||
uint32_t IC1Polarity; /*!< Specifies the active edge of the input signal.
|
|||
This parameter can be a value of @ref TIM_Input_Capture_Polarity */ |
|||
|
|||
uint32_t IC1Prescaler; /*!< Specifies the Input Capture Prescaler.
|
|||
This parameter can be a value of @ref TIM_Input_Capture_Prescaler */ |
|||
|
|||
uint32_t IC1Filter; /*!< Specifies the input capture filter.
|
|||
This parameter can be a number between Min_Data = 0x0 and Max_Data = 0xF */ |
|||
|
|||
uint32_t Commutation_Delay; /*!< Specifies the pulse value to be loaded into the Capture Compare Register.
|
|||
This parameter can be a number between Min_Data = 0x0000 and Max_Data = 0xFFFF */ |
|||
} TIM_HallSensor_InitTypeDef; |
|||
/**
|
|||
* @} |
|||
*/ |
|||
/* End of exported types -----------------------------------------------------*/ |
|||
|
|||
/* Exported constants --------------------------------------------------------*/ |
|||
/** @defgroup TIMEx_Exported_Constants TIM Extended Exported Constants
|
|||
* @{ |
|||
*/ |
|||
|
|||
/** @defgroup TIMEx_Remap TIM Extended Remapping
|
|||
* @{ |
|||
*/ |
|||
#if defined (TIM2) |
|||
#if defined(TIM8) |
|||
#define TIM_TIM2_TIM8_TRGO 0x00000000U /*!< TIM2 ITR1 is connected to TIM8 TRGO */ |
|||
#else |
|||
#define TIM_TIM2_ETH_PTP TIM_OR_ITR1_RMP_0 /*!< TIM2 ITR1 is connected to PTP trigger output */ |
|||
#endif /* TIM8 */ |
|||
#define TIM_TIM2_USBFS_SOF TIM_OR_ITR1_RMP_1 /*!< TIM2 ITR1 is connected to OTG FS SOF */ |
|||
#define TIM_TIM2_USBHS_SOF (TIM_OR_ITR1_RMP_1 | TIM_OR_ITR1_RMP_0) /*!< TIM2 ITR1 is connected to OTG HS SOF */ |
|||
#endif /* TIM2 */ |
|||
|
|||
#define TIM_TIM5_GPIO 0x00000000U /*!< TIM5 TI4 is connected to GPIO */ |
|||
#define TIM_TIM5_LSI TIM_OR_TI4_RMP_0 /*!< TIM5 TI4 is connected to LSI */ |
|||
#define TIM_TIM5_LSE TIM_OR_TI4_RMP_1 /*!< TIM5 TI4 is connected to LSE */ |
|||
#define TIM_TIM5_RTC (TIM_OR_TI4_RMP_1 | TIM_OR_TI4_RMP_0) /*!< TIM5 TI4 is connected to the RTC wakeup interrupt */ |
|||
|
|||
#define TIM_TIM11_GPIO 0x00000000U /*!< TIM11 TI1 is connected to GPIO */ |
|||
#define TIM_TIM11_HSE TIM_OR_TI1_RMP_1 /*!< TIM11 TI1 is connected to HSE_RTC clock */ |
|||
#if defined(SPDIFRX) |
|||
#define TIM_TIM11_SPDIFRX TIM_OR_TI1_RMP_0 /*!< TIM11 TI1 is connected to SPDIFRX_FRAME_SYNC */ |
|||
#endif /* SPDIFRX*/ |
|||
|
|||
#if defined(LPTIM_OR_TIM1_ITR2_RMP) && defined(LPTIM_OR_TIM5_ITR1_RMP) && defined(LPTIM_OR_TIM5_ITR1_RMP) |
|||
#define LPTIM_REMAP_MASK 0x10000000U |
|||
|
|||
#define TIM_TIM9_TIM3_TRGO LPTIM_REMAP_MASK /*!< TIM9 ITR1 is connected to TIM3 TRGO */ |
|||
#define TIM_TIM9_LPTIM (LPTIM_REMAP_MASK | LPTIM_OR_TIM9_ITR1_RMP) /*!< TIM9 ITR1 is connected to LPTIM1 output */ |
|||
|
|||
#define TIM_TIM5_TIM3_TRGO LPTIM_REMAP_MASK /*!< TIM5 ITR1 is connected to TIM3 TRGO */ |
|||
#define TIM_TIM5_LPTIM (LPTIM_REMAP_MASK | LPTIM_OR_TIM5_ITR1_RMP) /*!< TIM5 ITR1 is connected to LPTIM1 output */ |
|||
|
|||
#define TIM_TIM1_TIM3_TRGO LPTIM_REMAP_MASK /*!< TIM1 ITR2 is connected to TIM3 TRGO */ |
|||
#define TIM_TIM1_LPTIM (LPTIM_REMAP_MASK | LPTIM_OR_TIM1_ITR2_RMP) /*!< TIM1 ITR2 is connected to LPTIM1 output */ |
|||
#endif /* LPTIM_OR_TIM1_ITR2_RMP && LPTIM_OR_TIM5_ITR1_RMP && LPTIM_OR_TIM5_ITR1_RMP */ |
|||
/**
|
|||
* @} |
|||
*/ |
|||
|
|||
/**
|
|||
* @} |
|||
*/ |
|||
/* End of exported constants -------------------------------------------------*/ |
|||
|
|||
/* Exported macro ------------------------------------------------------------*/ |
|||
/** @defgroup TIMEx_Exported_Macros TIM Extended Exported Macros
|
|||
* @{ |
|||
*/ |
|||
|
|||
/**
|
|||
* @} |
|||
*/ |
|||
/* End of exported macro -----------------------------------------------------*/ |
|||
|
|||
/* Private macro -------------------------------------------------------------*/ |
|||
/** @defgroup TIMEx_Private_Macros TIM Extended Private Macros
|
|||
* @{ |
|||
*/ |
|||
#if defined(SPDIFRX) |
|||
#define IS_TIM_REMAP(INSTANCE, TIM_REMAP) \ |
|||
((((INSTANCE) == TIM2) && (((TIM_REMAP) == TIM_TIM2_TIM8_TRGO) || \ |
|||
((TIM_REMAP) == TIM_TIM2_USBFS_SOF) || \ |
|||
((TIM_REMAP) == TIM_TIM2_USBHS_SOF))) || \ |
|||
(((INSTANCE) == TIM5) && (((TIM_REMAP) == TIM_TIM5_GPIO) || \ |
|||
((TIM_REMAP) == TIM_TIM5_LSI) || \ |
|||
((TIM_REMAP) == TIM_TIM5_LSE) || \ |
|||
((TIM_REMAP) == TIM_TIM5_RTC))) || \ |
|||
(((INSTANCE) == TIM11) && (((TIM_REMAP) == TIM_TIM11_GPIO) || \ |
|||
((TIM_REMAP) == TIM_TIM11_SPDIFRX) || \ |
|||
((TIM_REMAP) == TIM_TIM11_HSE)))) |
|||
#elif defined(TIM2) |
|||
#if defined(LPTIM_OR_TIM1_ITR2_RMP) && defined(LPTIM_OR_TIM5_ITR1_RMP) && defined(LPTIM_OR_TIM5_ITR1_RMP) |
|||
#define IS_TIM_REMAP(INSTANCE, TIM_REMAP) \ |
|||
((((INSTANCE) == TIM2) && (((TIM_REMAP) == TIM_TIM2_TIM8_TRGO) || \ |
|||
((TIM_REMAP) == TIM_TIM2_USBFS_SOF) || \ |
|||
((TIM_REMAP) == TIM_TIM2_USBHS_SOF))) || \ |
|||
(((INSTANCE) == TIM5) && (((TIM_REMAP) == TIM_TIM5_GPIO) || \ |
|||
((TIM_REMAP) == TIM_TIM5_LSI) || \ |
|||
((TIM_REMAP) == TIM_TIM5_LSE) || \ |
|||
((TIM_REMAP) == TIM_TIM5_RTC))) || \ |
|||
(((INSTANCE) == TIM11) && (((TIM_REMAP) == TIM_TIM11_GPIO) || \ |
|||
((TIM_REMAP) == TIM_TIM11_HSE))) || \ |
|||
(((INSTANCE) == TIM1) && (((TIM_REMAP) == TIM_TIM1_TIM3_TRGO) || \ |
|||
((TIM_REMAP) == TIM_TIM1_LPTIM))) || \ |
|||
(((INSTANCE) == TIM5) && (((TIM_REMAP) == TIM_TIM5_TIM3_TRGO) || \ |
|||
((TIM_REMAP) == TIM_TIM5_LPTIM))) || \ |
|||
(((INSTANCE) == TIM9) && (((TIM_REMAP) == TIM_TIM9_TIM3_TRGO) || \ |
|||
((TIM_REMAP) == TIM_TIM9_LPTIM)))) |
|||
#elif defined(TIM8) |
|||
#define IS_TIM_REMAP(INSTANCE, TIM_REMAP) \ |
|||
((((INSTANCE) == TIM2) && (((TIM_REMAP) == TIM_TIM2_TIM8_TRGO) || \ |
|||
((TIM_REMAP) == TIM_TIM2_USBFS_SOF) || \ |
|||
((TIM_REMAP) == TIM_TIM2_USBHS_SOF))) || \ |
|||
(((INSTANCE) == TIM5) && (((TIM_REMAP) == TIM_TIM5_GPIO) || \ |
|||
((TIM_REMAP) == TIM_TIM5_LSI) || \ |
|||
((TIM_REMAP) == TIM_TIM5_LSE) || \ |
|||
((TIM_REMAP) == TIM_TIM5_RTC))) || \ |
|||
(((INSTANCE) == TIM11) && (((TIM_REMAP) == TIM_TIM11_GPIO) || \ |
|||
((TIM_REMAP) == TIM_TIM11_HSE)))) |
|||
#else |
|||
#define IS_TIM_REMAP(INSTANCE, TIM_REMAP) \ |
|||
((((INSTANCE) == TIM2) && (((TIM_REMAP) == TIM_TIM2_ETH_PTP) || \ |
|||
((TIM_REMAP) == TIM_TIM2_USBFS_SOF) || \ |
|||
((TIM_REMAP) == TIM_TIM2_USBHS_SOF))) || \ |
|||
(((INSTANCE) == TIM5) && (((TIM_REMAP) == TIM_TIM5_GPIO) || \ |
|||
((TIM_REMAP) == TIM_TIM5_LSI) || \ |
|||
((TIM_REMAP) == TIM_TIM5_LSE) || \ |
|||
((TIM_REMAP) == TIM_TIM5_RTC))) || \ |
|||
(((INSTANCE) == TIM11) && (((TIM_REMAP) == TIM_TIM11_GPIO) || \ |
|||
((TIM_REMAP) == TIM_TIM11_HSE)))) |
|||
#endif /* LPTIM_OR_TIM1_ITR2_RMP && LPTIM_OR_TIM5_ITR1_RMP && LPTIM_OR_TIM5_ITR1_RMP */ |
|||
#else |
|||
#define IS_TIM_REMAP(INSTANCE, TIM_REMAP) \ |
|||
((((INSTANCE) == TIM5) && (((TIM_REMAP) == TIM_TIM5_GPIO) || \ |
|||
((TIM_REMAP) == TIM_TIM5_LSI) || \ |
|||
((TIM_REMAP) == TIM_TIM5_LSE) || \ |
|||
((TIM_REMAP) == TIM_TIM5_RTC))) || \ |
|||
(((INSTANCE) == TIM11) && (((TIM_REMAP) == TIM_TIM11_GPIO) || \ |
|||
((TIM_REMAP) == TIM_TIM11_HSE)))) |
|||
#endif /* SPDIFRX */ |
|||
|
|||
/**
|
|||
* @} |
|||
*/ |
|||
/* End of private macro ------------------------------------------------------*/ |
|||
|
|||
/* Exported functions --------------------------------------------------------*/ |
|||
/** @addtogroup TIMEx_Exported_Functions TIM Extended Exported Functions
|
|||
* @{ |
|||
*/ |
|||
|
|||
/** @addtogroup TIMEx_Exported_Functions_Group1 Extended Timer Hall Sensor functions
|
|||
* @brief Timer Hall Sensor functions |
|||
* @{ |
|||
*/ |
|||
/* Timer Hall Sensor functions **********************************************/ |
|||
HAL_StatusTypeDef HAL_TIMEx_HallSensor_Init(TIM_HandleTypeDef *htim, TIM_HallSensor_InitTypeDef *sConfig); |
|||
HAL_StatusTypeDef HAL_TIMEx_HallSensor_DeInit(TIM_HandleTypeDef *htim); |
|||
|
|||
void HAL_TIMEx_HallSensor_MspInit(TIM_HandleTypeDef *htim); |
|||
void HAL_TIMEx_HallSensor_MspDeInit(TIM_HandleTypeDef *htim); |
|||
|
|||
/* Blocking mode: Polling */ |
|||
HAL_StatusTypeDef HAL_TIMEx_HallSensor_Start(TIM_HandleTypeDef *htim); |
|||
HAL_StatusTypeDef HAL_TIMEx_HallSensor_Stop(TIM_HandleTypeDef *htim); |
|||
/* Non-Blocking mode: Interrupt */ |
|||
HAL_StatusTypeDef HAL_TIMEx_HallSensor_Start_IT(TIM_HandleTypeDef *htim); |
|||
HAL_StatusTypeDef HAL_TIMEx_HallSensor_Stop_IT(TIM_HandleTypeDef *htim); |
|||
/* Non-Blocking mode: DMA */ |
|||
HAL_StatusTypeDef HAL_TIMEx_HallSensor_Start_DMA(TIM_HandleTypeDef *htim, uint32_t *pData, uint16_t Length); |
|||
HAL_StatusTypeDef HAL_TIMEx_HallSensor_Stop_DMA(TIM_HandleTypeDef *htim); |
|||
/**
|
|||
* @} |
|||
*/ |
|||
|
|||
/** @addtogroup TIMEx_Exported_Functions_Group2 Extended Timer Complementary Output Compare functions
|
|||
* @brief Timer Complementary Output Compare functions |
|||
* @{ |
|||
*/ |
|||
/* Timer Complementary Output Compare functions *****************************/ |
|||
/* Blocking mode: Polling */ |
|||
HAL_StatusTypeDef HAL_TIMEx_OCN_Start(TIM_HandleTypeDef *htim, uint32_t Channel); |
|||
HAL_StatusTypeDef HAL_TIMEx_OCN_Stop(TIM_HandleTypeDef *htim, uint32_t Channel); |
|||
|
|||
/* Non-Blocking mode: Interrupt */ |
|||
HAL_StatusTypeDef HAL_TIMEx_OCN_Start_IT(TIM_HandleTypeDef *htim, uint32_t Channel); |
|||
HAL_StatusTypeDef HAL_TIMEx_OCN_Stop_IT(TIM_HandleTypeDef *htim, uint32_t Channel); |
|||
|
|||
/* Non-Blocking mode: DMA */ |
|||
HAL_StatusTypeDef HAL_TIMEx_OCN_Start_DMA(TIM_HandleTypeDef *htim, uint32_t Channel, uint32_t *pData, uint16_t Length); |
|||
HAL_StatusTypeDef HAL_TIMEx_OCN_Stop_DMA(TIM_HandleTypeDef *htim, uint32_t Channel); |
|||
/**
|
|||
* @} |
|||
*/ |
|||
|
|||
/** @addtogroup TIMEx_Exported_Functions_Group3 Extended Timer Complementary PWM functions
|
|||
* @brief Timer Complementary PWM functions |
|||
* @{ |
|||
*/ |
|||
/* Timer Complementary PWM functions ****************************************/ |
|||
/* Blocking mode: Polling */ |
|||
HAL_StatusTypeDef HAL_TIMEx_PWMN_Start(TIM_HandleTypeDef *htim, uint32_t Channel); |
|||
HAL_StatusTypeDef HAL_TIMEx_PWMN_Stop(TIM_HandleTypeDef *htim, uint32_t Channel); |
|||
|
|||
/* Non-Blocking mode: Interrupt */ |
|||
HAL_StatusTypeDef HAL_TIMEx_PWMN_Start_IT(TIM_HandleTypeDef *htim, uint32_t Channel); |
|||
HAL_StatusTypeDef HAL_TIMEx_PWMN_Stop_IT(TIM_HandleTypeDef *htim, uint32_t Channel); |
|||
/* Non-Blocking mode: DMA */ |
|||
HAL_StatusTypeDef HAL_TIMEx_PWMN_Start_DMA(TIM_HandleTypeDef *htim, uint32_t Channel, uint32_t *pData, uint16_t Length); |
|||
HAL_StatusTypeDef HAL_TIMEx_PWMN_Stop_DMA(TIM_HandleTypeDef *htim, uint32_t Channel); |
|||
/**
|
|||
* @} |
|||
*/ |
|||
|
|||
/** @addtogroup TIMEx_Exported_Functions_Group4 Extended Timer Complementary One Pulse functions
|
|||
* @brief Timer Complementary One Pulse functions |
|||
* @{ |
|||
*/ |
|||
/* Timer Complementary One Pulse functions **********************************/ |
|||
/* Blocking mode: Polling */ |
|||
HAL_StatusTypeDef HAL_TIMEx_OnePulseN_Start(TIM_HandleTypeDef *htim, uint32_t OutputChannel); |
|||
HAL_StatusTypeDef HAL_TIMEx_OnePulseN_Stop(TIM_HandleTypeDef *htim, uint32_t OutputChannel); |
|||
|
|||
/* Non-Blocking mode: Interrupt */ |
|||
HAL_StatusTypeDef HAL_TIMEx_OnePulseN_Start_IT(TIM_HandleTypeDef *htim, uint32_t OutputChannel); |
|||
HAL_StatusTypeDef HAL_TIMEx_OnePulseN_Stop_IT(TIM_HandleTypeDef *htim, uint32_t OutputChannel); |
|||
/**
|
|||
* @} |
|||
*/ |
|||
|
|||
/** @addtogroup TIMEx_Exported_Functions_Group5 Extended Peripheral Control functions
|
|||
* @brief Peripheral Control functions |
|||
* @{ |
|||
*/ |
|||
/* Extended Control functions ************************************************/ |
|||
HAL_StatusTypeDef HAL_TIMEx_ConfigCommutEvent(TIM_HandleTypeDef *htim, uint32_t InputTrigger, |
|||
uint32_t CommutationSource); |
|||
HAL_StatusTypeDef HAL_TIMEx_ConfigCommutEvent_IT(TIM_HandleTypeDef *htim, uint32_t InputTrigger, |
|||
uint32_t CommutationSource); |
|||
HAL_StatusTypeDef HAL_TIMEx_ConfigCommutEvent_DMA(TIM_HandleTypeDef *htim, uint32_t InputTrigger, |
|||
uint32_t CommutationSource); |
|||
HAL_StatusTypeDef HAL_TIMEx_MasterConfigSynchronization(TIM_HandleTypeDef *htim, |
|||
TIM_MasterConfigTypeDef *sMasterConfig); |
|||
HAL_StatusTypeDef HAL_TIMEx_ConfigBreakDeadTime(TIM_HandleTypeDef *htim, |
|||
TIM_BreakDeadTimeConfigTypeDef *sBreakDeadTimeConfig); |
|||
HAL_StatusTypeDef HAL_TIMEx_RemapConfig(TIM_HandleTypeDef *htim, uint32_t Remap); |
|||
/**
|
|||
* @} |
|||
*/ |
|||
|
|||
/** @addtogroup TIMEx_Exported_Functions_Group6 Extended Callbacks functions
|
|||
* @brief Extended Callbacks functions |
|||
* @{ |
|||
*/ |
|||
/* Extended Callback **********************************************************/ |
|||
void HAL_TIMEx_CommutCallback(TIM_HandleTypeDef *htim); |
|||
void HAL_TIMEx_CommutHalfCpltCallback(TIM_HandleTypeDef *htim); |
|||
void HAL_TIMEx_BreakCallback(TIM_HandleTypeDef *htim); |
|||
/**
|
|||
* @} |
|||
*/ |
|||
|
|||
/** @addtogroup TIMEx_Exported_Functions_Group7 Extended Peripheral State functions
|
|||
* @brief Extended Peripheral State functions |
|||
* @{ |
|||
*/ |
|||
/* Extended Peripheral State functions ***************************************/ |
|||
HAL_TIM_StateTypeDef HAL_TIMEx_HallSensor_GetState(TIM_HandleTypeDef *htim); |
|||
HAL_TIM_ChannelStateTypeDef HAL_TIMEx_GetChannelNState(TIM_HandleTypeDef *htim, uint32_t ChannelN); |
|||
/**
|
|||
* @} |
|||
*/ |
|||
|
|||
/**
|
|||
* @} |
|||
*/ |
|||
/* End of exported functions -------------------------------------------------*/ |
|||
|
|||
/* Private functions----------------------------------------------------------*/ |
|||
/** @addtogroup TIMEx_Private_Functions TIM Extended Private Functions
|
|||
* @{ |
|||
*/ |
|||
void TIMEx_DMACommutationCplt(DMA_HandleTypeDef *hdma); |
|||
void TIMEx_DMACommutationHalfCplt(DMA_HandleTypeDef *hdma); |
|||
/**
|
|||
* @} |
|||
*/ |
|||
/* End of private functions --------------------------------------------------*/ |
|||
|
|||
/**
|
|||
* @} |
|||
*/ |
|||
|
|||
/**
|
|||
* @} |
|||
*/ |
|||
|
|||
#ifdef __cplusplus |
|||
} |
|||
#endif |
|||
|
|||
|
|||
#endif /* STM32F4xx_HAL_TIM_EX_H */ |
File diff suppressed because it is too large
File diff suppressed because it is too large
File diff suppressed because it is too large
Loading…
Reference in new issue