2022-09-27 08:51 AM
2022-09-27 09:11 AM
Use the measured signal input as timer clock input. You cannot use capture function reasonably at 10 MHz.
2022-09-27 09:12 AM
How fast is the STM32 clocking?
Not counting properly? Please expand on what it is doing..
Should be using External Clock modes, probably not measuring cycles.
2022-09-27 02:11 PM
> TIM_ICInitStructure.TIM_ICPrescaler = TIM_ICPSC_DIV2;
Why? (although I don't think this makes any difference in this particular case)
> TIM1->SMCR |= TIM_SMCR_SMS_2 | TIM_SMCR_SMS_1| TIM_SMCR_TS_2 | TIM_SMCR_TS_1;
That's TIM1_SMCR.SMS = 0b110 = Trigger Mode.
You probably want 0b111 = External Clock Mode 1, don't you.
Plus all the questions of TeslaDelorean.
JW
2022-09-28 03:53 AM
I don't quite understand what you mean, can you give an example?
2022-09-28 03:55 AM
I expect it to count every time a rising edge in but it doesn't