Why is GPIO toggle output frequency half of expected timer frequency?
I've been trying to configure a TIM6 to run at 48kHz, where APB1 is 108MHz, but because the APBDIV > 1, I used PSC = 449, and Period = 9:
216,000,000 / ((449+1)*(9+1)) = 48,000
And in my timer interrupt, I set a GPIO output pin to toggle. When I probe the pin, I get a frequency of 24kHz.
I found this closed question https://community.st.com/s/question/0D50X00009XkWG7/timer-3-clock-half-of-that-expected
that seems to indicate that the GPIO output frequency does not reflect the timer clock frequency.
But why is this the case, and why is the GPIO frequency half? (I've experienced this with other frequencies, prescalers, etc)