2018-04-23 03:59 AM
Posted on April 23, 2018 at 12:59
I am using STM32f070xB controller. I want to use @TIM16_CH1 for input capture.
GPIO_PIN: ♯PB8
Timer clock freq: 3MHz
TIMER is getting interrupted continuously but after 120Hz, flow is not going into Capture compare callback.
i.e, __HAL_TIM_GET_FLAG(htim, TIM_FLAG_CC1) is always RESET for frequency above 120Hz.
Anyone can let me know, what can be the reason behind.
Even for specific PORT-PIN GPIO external interrupt is not happening after 120Hz.
2018-04-23 02:02 PM
Is compiler optimization switched on?
Cube/HAL interrupt handling consumes relatively lot of resources (computing time), you may want to rewrite the ISRs yourself.
JW
2018-04-23 11:16 PM
Yes, Compiler optimization is switched on.
The same implementation with TIM14_ch1, Port A pin 4.
TIM14 PB4 is able to capture interrupt till 2Khz (Maximum I have checked)
2018-04-24 03:20 PM
So, when you go over 120Hz with the input signal, TIM16 stops to throw the CC1 interrupts? And what happens if then you drop the input frequency, do the interrupts reappear or not?
Read out and check/post the TIM16 registers' content before and after the problem happens.
JW
2018-04-25 06:11 AM
Yes, Correct.
When I go over 120Hz with the input signal, TIM16 stops to throw the CC1 interrupts.
Then if I drop the input frequency, interrupt reappears.
I will read all pre and post TIM16 registers an update.