STMicroelectronics / x-cube-azrtos-h7

X-CUBE-AZRTOS-H7 (Azure RTOS Software Expansion for STM32Cube) provides a full integration of Microsoft Azure RTOS in the STM32Cube environment for the STM32H7 series of microcontrollers.

Home Page:https://www.st.com/en/embedded-software/x-cube-azrtos-h7.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

STM32H743 Timer HAL Channel Start and Stop

ajitbasarur opened this issue · comments

Hardware Set Up

  • Nucleo STM32H743 MCU
  • Latest HAL FW version

Bug

  • STM32 provides HAL library for the configuration of timers. In this bug, I am using TIM5 of STM32H743. However, this bug is applicable to other timers as well.
  • In order to start or stop a timer, there are separate set of functions available with HAL timer library. For example HAL_TIM_Base_Start***() and HAL_TIM_Base_Stop***() functions.
  • To start or stop an individual channel of a timer, there are also dedicated functions such as HAL_TIM_OC_Start***() and HAL_TIM_OC_Stop***()
  • What is the bug???
    • OC_Start() and OC_Stop() functions also enable and disable the timer within their implementations.
    • This will not allow us to operate the channels independent of timer counter. There are some application scenarios, where we would like to enable and disable only the channels without stopping the counter.

How to reproduce the bug (skip if none)

  1. HAL_TIM_Base_Start() --> HAL_TIM_OC_Stop() OR
  2. HAL_TIM_OC_Stop() --> HAL_TIM_OC_Start()

Additional context

I do not understand, why the OC enable and disable function should hamper the operation of timer counter!!! This hinders the operation of channels independent of counter.