cancel
Showing results for 
Search instead for 
Did you mean: 

Using STM32CubeMX 4.14.0 with timer function ''External clock source mode 1''

diverger
Senior
Posted on April 16, 2016 at 15:05

By RM0090 Reference manual, the time can work in ''external clock source mode 1'' mode. That is, the timer can be clocked by 'TIx' input. But I *can't* figure out how to configure it using cubeMX. For example, if I set TIM8's slave mode to ''External Clock Mode 1'', and set the trigger source to ''TI1FP1'', but the ''Channel1'' is grayed. The result is, I can't set CC1S! So 'External clock source mode 1' is hidden by STM32CubeMX actually. 

My target MCU is STM32F429IGx.
2 REPLIES 2
Walid FTITI_O
Senior II
Posted on April 18, 2016 at 13:13

Hi diverger, 

It’s not a CubeMx problem. You are making the wrong configuration there.

As mentioned in the reference manual

http://www2.st.com/content/ccc/resource/technical/document/reference_manual/3d/6d/5a/66/b4/99/40/d4/DM00031020.pdf/files/DM00031020.pdf/jcr:content/translations/en.DM00031020.pdf

, in  â€œClock selectionâ€� -> external clock source mode1 part, page 526:

“…..

4. Configure the timer in external clock mode 1 by writing SMS=111 in the TIMx_SMCR

register.

5. Select TI2 as the trigger input source by writing TS=110 in the TIMx_SMCR register.

…�

Setting TS=110 means selecting TI2FP2 as trigger source, but you are selection TI1FP2 instead.

-Hannibal-

diverger
Senior
Posted on April 19, 2016 at 07:55

Thanks, I'll give it a try.