AnsweredAssumed Answered

STM32F4 STMCube Initialization Problem

Question asked by Mesut TOPUZLU on Jul 2, 2017
Latest reply on Jul 3, 2017 by Imen D

Hi. I am using Keil and STM32F4-DISCOVERY BOARD and trying to run TIMIER 2 (TIM2) in "External Clock Source Mode 1". I am using STM32CubeMX and I select;

   1. TIM2 External Clock Source

   2. TI1 Channel (with TI1FP1)

   3. PA0 Alternate Function  for TI1 etc.

 

When I see MCU in debug mode and press USR BUTTON (PA0) there is no changing in CNT Register. 

ANd than, I researched indeedely this problem. I figured out that, during the initialization  the CC1S bir-field need to some configuration (such as CC1s = 10). But I see that STMCubeMX do not configure that in my code.

Any idea? Are STMCubeMX and HAL lib trustworthy enough?

 

And is teher a code sample for TIM2 Ext. Clock Source with HAL?

Outcomes