2023-12-05 8:58 PM - last edited on 2023-12-06 2:04 AM by Sarra.S
Hi,
I am using an event as an external clock input into the Advanced Control Timer (TIM1) on a STM32G0x series MCU.
For my application it will be nice to low pass filter the signal using the internal "Filter Downcounter" in the chip.
I don't understand the internal digital logic of the filter, nor can I find detail on how this Digital Filter works (Flip-Flops, ect...), but here is my theory and hopefully someone can please share more detail or correct me.
Datasheet Diagram
This is the diagram in the datasheet.
Inputs into filter: N(amount of samples) , fdts(counter frequency), ETRP(event signal)
I assume, the filter is a type of counter. If there is N consecutive events in the logic signal for 1/f(dts) time. The output logic signal of the filter contains one pulse.
After 1/f(dts) time, the filter resets the internal counter. Or if there is no event triggered in the signal, when an event was expected. Hence, it has to be, consecutive positive event triggers.
Now, f(dts) is related to the input clock frequency in the Datasheet. The sampling period of this t(dts), can be set to the following settings in the datasheet:
Solved! Go to Solution.
2023-12-06 2:11 AM
Hello @danielbathtub, welcome to ST Community
You can refer to 1.4.1 Filtering stage chapter in AN4776
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2023-12-06 2:11 AM
Hello @danielbathtub, welcome to ST Community
You can refer to 1.4.1 Filtering stage chapter in AN4776
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.