2023-02-16 04:13 AM
I’m attempting to configure TIM3 to count up on pulses received from an external trigger on TIM3CH1 but I'm not seeing CNT change.
I’ve followed the sample instructions in the datasheet (RM3099 Rev 3) (for External clock source mode 2--all registers mentioned below are set as directed and those that aren't are in their default state):
For example, to configure the upcounter to count each 2 rising edges on ETR, use the
following procedure:
My specific settings are:
I've also tried external trigger mode 1, following these instructions from the datasheet:
For example, to configure the upcounter to count in response to a rising edge on the TI2
input, use the following procedure:
I adapted these to use TI1 and had the pin connected to PC6 (TIM3CH1, configured as such). AN4776 has some detail to add to the examples from the datasheet, but there wasn't anything in there that really helped.
I have a 1kHz 50% duty cycle square wave generated from TIM1 that I’m feeding into TIM3CH1 (which I’ve also had produce an output to check electrical correctness). I’d expect to see CNT increasing, but I’m not. I feel like there's something fundamental I'm missing here--I'd appreciate any help you can provide.
2023-02-16 07:33 AM
Read out and check/post content of TIM3 and relevant GPIO registers.
JW
2023-02-16 09:28 AM
Hi Jan--thanks for the quick reply. Easiest way seemed to be to screenshot in ozone--I'm happy to provide a different format or add information.
ETR2 TIM3:
ETR2 GPIO:
ETR1 TIM3:
ETR1 GPIO:
2024-12-07 07:22 AM
I had this problem as well (for TIM8), and made two deviations from the reference manual's instructions for External Clock Mode 1 to get it working
No combination of configuration that I have made has been able to persuade the counter to increment with SMCR.TS set to any of the filtered input channels in External Clock Mode 1.