STM32L4xx_HAL_Driver  1.14.0
Extended Timer Complementary One Pulse functions

Timer Complementary One Pulse functions. More...

Functions

HAL_StatusTypeDef HAL_TIMEx_OnePulseN_Start (TIM_HandleTypeDef *htim, uint32_t OutputChannel)
 Starts the TIM One Pulse signal generation on the complementary output. More...
 
HAL_StatusTypeDef HAL_TIMEx_OnePulseN_Stop (TIM_HandleTypeDef *htim, uint32_t OutputChannel)
 Stops the TIM One Pulse signal generation on the complementary output. More...
 
HAL_StatusTypeDef HAL_TIMEx_OnePulseN_Start_IT (TIM_HandleTypeDef *htim, uint32_t OutputChannel)
 Starts the TIM One Pulse signal generation in interrupt mode on the complementary channel. More...
 
HAL_StatusTypeDef HAL_TIMEx_OnePulseN_Stop_IT (TIM_HandleTypeDef *htim, uint32_t OutputChannel)
 Stops the TIM One Pulse signal generation in interrupt mode on the complementary channel. More...
 

Detailed Description

Timer Complementary One Pulse functions.

  ==============================================================================
                ##### Timer Complementary One Pulse functions #####
  ==============================================================================
  [..]
    This section provides functions allowing to:
    (+) Start the Complementary One Pulse generation.
    (+) Stop the Complementary One Pulse.
    (+) Start the Complementary One Pulse and enable interrupts.
    (+) Stop the Complementary One Pulse and disable interrupts.

Function Documentation

◆ HAL_TIMEx_OnePulseN_Start()

HAL_StatusTypeDef HAL_TIMEx_OnePulseN_Start ( TIM_HandleTypeDef htim,
uint32_t  OutputChannel 
)

Starts the TIM One Pulse signal generation on the complementary output.

Parameters
htimTIM One Pulse handle
OutputChannelTIM Channel to be enabled This parameter can be one of the following values:
  • TIM_CHANNEL_1: TIM Channel 1 selected
  • TIM_CHANNEL_2: TIM Channel 2 selected
Return values
HALstatus

Definition at line 1314 of file stm32l4xx_hal_tim_ex.c.

1315 {
1316  /* Check the parameters */
1317  assert_param(IS_TIM_CCXN_INSTANCE(htim->Instance, OutputChannel));
1318 
1319  /* Enable the complementary One Pulse output */
1320  TIM_CCxNChannelCmd(htim->Instance, OutputChannel, TIM_CCxN_ENABLE);
1321 
1322  /* Enable the Main Output */
1323  __HAL_TIM_MOE_ENABLE(htim);
1324 
1325  /* Return function status */
1326  return HAL_OK;
1327 }
return HAL_OK
static void TIM_CCxNChannelCmd(TIM_TypeDef *TIMx, uint32_t Channel, uint32_t ChannelNState)
Enables or disables the TIM Capture Compare Channel xN.
assert_param(IS_RTC_WAKEUP_CLOCK(WakeUpClock))

◆ HAL_TIMEx_OnePulseN_Start_IT()

HAL_StatusTypeDef HAL_TIMEx_OnePulseN_Start_IT ( TIM_HandleTypeDef htim,
uint32_t  OutputChannel 
)

Starts the TIM One Pulse signal generation in interrupt mode on the complementary channel.

Parameters
htimTIM One Pulse handle
OutputChannelTIM Channel to be enabled This parameter can be one of the following values:
  • TIM_CHANNEL_1: TIM Channel 1 selected
  • TIM_CHANNEL_2: TIM Channel 2 selected
Return values
HALstatus

Definition at line 1368 of file stm32l4xx_hal_tim_ex.c.

1369 {
1370  /* Check the parameters */
1371  assert_param(IS_TIM_CCXN_INSTANCE(htim->Instance, OutputChannel));
1372 
1373  /* Enable the TIM Capture/Compare 1 interrupt */
1374  __HAL_TIM_ENABLE_IT(htim, TIM_IT_CC1);
1375 
1376  /* Enable the TIM Capture/Compare 2 interrupt */
1377  __HAL_TIM_ENABLE_IT(htim, TIM_IT_CC2);
1378 
1379  /* Enable the complementary One Pulse output */
1380  TIM_CCxNChannelCmd(htim->Instance, OutputChannel, TIM_CCxN_ENABLE);
1381 
1382  /* Enable the Main Output */
1383  __HAL_TIM_MOE_ENABLE(htim);
1384 
1385  /* Return function status */
1386  return HAL_OK;
1387 }
return HAL_OK
static void TIM_CCxNChannelCmd(TIM_TypeDef *TIMx, uint32_t Channel, uint32_t ChannelNState)
Enables or disables the TIM Capture Compare Channel xN.
assert_param(IS_RTC_WAKEUP_CLOCK(WakeUpClock))

◆ HAL_TIMEx_OnePulseN_Stop()

HAL_StatusTypeDef HAL_TIMEx_OnePulseN_Stop ( TIM_HandleTypeDef htim,
uint32_t  OutputChannel 
)

Stops the TIM One Pulse signal generation on the complementary output.

Parameters
htimTIM One Pulse handle
OutputChannelTIM Channel to be disabled This parameter can be one of the following values:
  • TIM_CHANNEL_1: TIM Channel 1 selected
  • TIM_CHANNEL_2: TIM Channel 2 selected
Return values
HALstatus

Definition at line 1339 of file stm32l4xx_hal_tim_ex.c.

1340 {
1341 
1342  /* Check the parameters */
1343  assert_param(IS_TIM_CCXN_INSTANCE(htim->Instance, OutputChannel));
1344 
1345  /* Disable the complementary One Pulse output */
1346  TIM_CCxNChannelCmd(htim->Instance, OutputChannel, TIM_CCxN_DISABLE);
1347 
1348  /* Disable the Main Output */
1349  __HAL_TIM_MOE_DISABLE(htim);
1350 
1351  /* Disable the Peripheral */
1352  __HAL_TIM_DISABLE(htim);
1353 
1354  /* Return function status */
1355  return HAL_OK;
1356 }
return HAL_OK
static void TIM_CCxNChannelCmd(TIM_TypeDef *TIMx, uint32_t Channel, uint32_t ChannelNState)
Enables or disables the TIM Capture Compare Channel xN.
assert_param(IS_RTC_WAKEUP_CLOCK(WakeUpClock))

◆ HAL_TIMEx_OnePulseN_Stop_IT()

HAL_StatusTypeDef HAL_TIMEx_OnePulseN_Stop_IT ( TIM_HandleTypeDef htim,
uint32_t  OutputChannel 
)

Stops the TIM One Pulse signal generation in interrupt mode on the complementary channel.

Parameters
htimTIM One Pulse handle
OutputChannelTIM Channel to be disabled This parameter can be one of the following values:
  • TIM_CHANNEL_1: TIM Channel 1 selected
  • TIM_CHANNEL_2: TIM Channel 2 selected
Return values
HALstatus

Definition at line 1399 of file stm32l4xx_hal_tim_ex.c.

1400 {
1401  /* Check the parameters */
1402  assert_param(IS_TIM_CCXN_INSTANCE(htim->Instance, OutputChannel));
1403 
1404  /* Disable the TIM Capture/Compare 1 interrupt */
1405  __HAL_TIM_DISABLE_IT(htim, TIM_IT_CC1);
1406 
1407  /* Disable the TIM Capture/Compare 2 interrupt */
1408  __HAL_TIM_DISABLE_IT(htim, TIM_IT_CC2);
1409 
1410  /* Disable the complementary One Pulse output */
1411  TIM_CCxNChannelCmd(htim->Instance, OutputChannel, TIM_CCxN_DISABLE);
1412 
1413  /* Disable the Main Output */
1414  __HAL_TIM_MOE_DISABLE(htim);
1415 
1416  /* Disable the Peripheral */
1417  __HAL_TIM_DISABLE(htim);
1418 
1419  /* Return function status */
1420  return HAL_OK;
1421 }
return HAL_OK
static void TIM_CCxNChannelCmd(TIM_TypeDef *TIMx, uint32_t Channel, uint32_t ChannelNState)
Enables or disables the TIM Capture Compare Channel xN.
assert_param(IS_RTC_WAKEUP_CLOCK(WakeUpClock))