2021-04-02 03:28 PM
Hi
I am trying to implement a fault filter for the HRTIM on a stm32G474.
I am using the LL libraries and the Reference manual.
I find the table 234 in the reference manual completely unreadable and confusing. Could someone please explain how it is suppose to be interpreted.
Lets take an example.
my Fhrtim is 170 mhz and I have done the following
LL_HRTIM_FLT_SetPrescaler(HRTIM1, LL_HRTIM_FLT_PRESCALER_DIV2);
LL_HRTIM_FLT_SetFilter(HRTIM1, LL_HRTIM_FAULT_1, LL_HRTIM_FLT_FILTER_4);
How do i calcualte the filter length?
Best regards
Martin
Solved! Go to Solution.
2021-05-05 08:59 AM
Hello @marbel ,
The filter length is the minimum time it requires to consider that an input is valid.
Let’s take Fflts= fhrtim (period = 5.9ns), and N=2: in this case the input needs to be active for at least two clock periods until it is considered valid and propagated to the rest of the timer.
For Fflts= fhrtim/4 (period = 23.5ns), and N=6: the input needs to be active for at least 6 x 23.5 = 141ns until it is considered valid.
You can consider it as the propagation delay of the digital filter also.
Hope this helps you 😊.
When your question is answered, please close this topic by choosing "Select as Best". This will help other users find that answer faster.
Imen
2021-05-05 08:59 AM
Hello @marbel ,
The filter length is the minimum time it requires to consider that an input is valid.
Let’s take Fflts= fhrtim (period = 5.9ns), and N=2: in this case the input needs to be active for at least two clock periods until it is considered valid and propagated to the rest of the timer.
For Fflts= fhrtim/4 (period = 23.5ns), and N=6: the input needs to be active for at least 6 x 23.5 = 141ns until it is considered valid.
You can consider it as the propagation delay of the digital filter also.
Hope this helps you 😊.
When your question is answered, please close this topic by choosing "Select as Best". This will help other users find that answer faster.
Imen
2021-05-05 12:24 PM
Hi Imen and thanks for your response.
I ended up using trail and error and a signal generator in order to get the result I wanted.
I get what you are describing, it is mostly the table that is confusing. If I write FLTSD[1:0] = 01 for example, I will get DIFFERENT prescalers of fHRTIM depending on what I write to FLTFxF[3:0].
Best regards
Martin