2024-05-15 11:48 PM - edited 2024-05-15 11:49 PM
Hi all,
i'm working with a STM32F469i-discovery board trying to read the external signal at 32kHz coming from an RTC module. The oscillating signal voltage is a CMOS type. I'm using TIM2_ETR input located on pin PA15 configured as follow. I'm not able to read any pulse on the pin and every time that I run the system the oscillator voltage fall to 0.3V instead of the 2.5V that I can measure when the system is not running.
I test the oscillator signal on Arduino board and I can read the right frequency just connectin the oscillator output to Arduino pin8. Thanks for the support.
2024-05-15 11:56 PM - edited 2024-05-16 01:25 AM
Hi,
you need to choose PA5 (or other) -> = an input , NOT any push-pull output ! (or whatever pin cube gives you with your case as ETR clk input)
2024-05-16 12:20 AM
Hi, thankyou for your replay, I'm not able to select any other pin configuration, if I link PA15 to TIM2_ETR this is the only configuration possible from the menu. If I set PA15 as input i loose the connection to TIM2_ETR that is automatically changed to PA5.
2024-05-16 01:23 AM - edited 2024-05-16 01:26 AM
If you choose etr2 as clk , you see a pin as input in gpio -> this pin is your clk input now !
just look, what cube shows you...you might choose another pin by remap, if possible, then this is the input.
But you cannot choose any pin, you like !
2024-05-16 01:55 AM
Ok, i just tried on a H743 here, cube giving me PA0 as ETR input (or PA5, or PA15 ).
So you did everything ok, i think.
Select one of them , the this is your etr-clk input (try PA5) .
No put your 32k clk on this pin, and what happens ?
2024-05-16 02:00 AM
Don't set Channel 1 to Output Compare.
JW
2024-05-16 02:30 AM
it always count until 6 and it stop, I also change RTC module 3 times but the result is the same, oscillator stop working (voltage dorp to 0.3V), if i disconnect the oscillator from the board it restart wiht the sandard behavior.
Channel 1 "output compare no output" is the only possibility that is given for this configuration
2024-05-16 04:48 AM - edited 2024-05-16 04:48 AM
> Channel 1 "output compare no output" is the only possibility that is given for this configuration
That might be OK, but what I see in registers is definitively not "no output".
In particular CCER=1 means, that CH1 is enabled; and as in CCMR1 it is set to Output compare, given pin turns to output (TIM2_CH1 is shared with TIM2_ETR on PA15).
I don't use Cube/CubeMX so can't tell how can you avoid this using Cube/CubeMX. It may be a bug in Cube/CubeMX.
I generally recommend you to use register-based programming instead, but some here find that an extereme approach.
JW
2024-05-16 06:47 AM
>Channel 1 "output compare no output" is the only possibility that is given for this configuration
no.
set CC1 : disable :
2024-05-16 07:21 AM
you are righ, i tested this configuration on both pins (PA5 and PA15), no changes, it reach a value of 7 and stops counting