2017-11-08 01:50 AM
Hi
I have a question about using a timer to count pulses form a encoder (only one pin) I don't care about the direction.
I'm trying to use Timer 3, but I'm not sure how to set it up in CubeMx.
I start it with:
HAL_TIM_Base_Start( mpEncoderTim );
And read with:
count = mpEncoderTim->Instance->CNT;
Hope anyone of you, have done this before, so you can give me a hint
thanks in advance and best regards
panduro..
#stm32f7-timerSolved! Go to Solution.
2017-11-08 04:22 AM
I think I solved the case.
Counter Period was 0 :(
2017-11-08 02:03 AM
On TIM13 you can't - it does not have the slave mode controller needed for external counting modes.
Look into RM, search for SMCR register, look at its SMS field.
JW
2017-11-08 02:17 AM
sorry for my mistake I meant Timer 3
2017-11-08 03:40 AM
I don't use CubeMX nor Cube.
You want to set TIMx_ARR (I guess it's what is called there 'period') to nonzero.
JW
2017-11-08 04:22 AM
I think I solved the case.
Counter Period was 0 :(