cancel
Showing results for 
Search instead for 
Did you mean: 

Setting TIM6 and TIM 7 according to HAL library.

Md Mubdiul Hasan
Associate III
Posted on October 07, 2016 at 04:07

Dear All, 

Can you help me to apply press button GPIO read, capture, compare by TIM6/TIM7 application ?

I am using stm32f0xx_hal.h.

Thanks in advance.
2 REPLIES 2
Walid FTITI_O
Senior II
Posted on October 10, 2016 at 13:38

Hi hasan.md_mubdiul, 

Your need is not so clear but it seems you need to deal with the press-button and read it status one pressed for doing some operations. For that, I recommend to achieve this with configuring the connected EXTI line and the relevant GPIO to proceed in interrupt mode. Check the ''GPIO_EXTI'' example in the

http://www.st.com/content/st_com/en/products/embedded-software/mcus-embedded-software/stm32-embedded-software/stm32cube-embedded-software/stm32cubef0.html

at this path: STM32Cube_FW_F0_V1.6.0\Projects\STM32072B_EVAL\Examples\GPIO\GPIO_EXTI

Otherwise if you want to use Timers in input capture mode, refer to the example ''InputCapture'' at this path :  STM32Cube_FW_F0_V1.6.0\Projects\STM32072B_EVAL\Examples\TIM\TIM_InputCapture

-Hannibal-
Md Mubdiul Hasan
Associate III
Posted on October 11, 2016 at 02:54

Dear Sir, Hannibal,

You exactly point out what I want to do, my aim is to  generate pwm and press-button to read it for switching transistors. Lets try for your examples.

Posted: Monday, October 10, 2016 1:39 PM

Subject: Setting TIM6 and TIM 7 according to HAL library.

Hi hasan.md_mubdiul, 

Your need is not so clear but it seems you need to deal with the press-button and read it status one pressed for doing some operations. For that, I recommend to achieve this with configuring the connected EXTI line and the relevant GPIO to proceed in interrupt mode. Check the ''GPIO_EXTI'' example in the

http://www.st.com/content/st_com/en/products/embedded-software/mcus-embedded-software/stm32-embedded-software/stm32cube-embedded-software/stm32cubef0.html

at this path: STM32Cube_FW_F0_V1.6.0\Projects\STM32072B_EVAL\Examples\GPIO\GPIO_EXTI

Otherwise if you want to use Timers in input capture mode, refer to the example ''InputCapture'' at this path :  STM32Cube_FW_F0_V1.6.0\Projects\STM32072B_EVAL\Examples\TIM\TIM_InputCapture

-Hannibal-