cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F4 STMCube Initialization Problem

Mesut TOPUZLU
Associate II
Posted on July 02, 2017 at 14:24

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?

1 REPLY 1
Imen.D
ST Employee
Posted on July 03, 2017 at 12:56

Hi

TOPUZLU.Mesut

,

Could you please provide more details about CubeMx and HAL version you are using.

You can share your .ioc file to check your issue, this willhelp user forum to answer you.

Regards

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen