cancel
Showing results for 
Search instead for 
Did you mean: 

Input filter too short!

Corentin Zill
Associate
Posted on September 22, 2017 at 10:14

Hi everybody! 

I'm using the input capture digital filter function of TIM15 on STM32F070CB. I need to filter out pulses shorter than 1.5ms and I want to keep FCLK at 48MHz.

Problem is, in this case, I can't have a TIM15 timer clock slower than 6MHz (div/16*2), then divided by 4 (max.) with CKD=10, then using fDTS/32 with 8 samples (max.). This gives a period of 170us, which is definitely too short for me.

I tried to use TIM3 as prescaler for TIM15, but it doesn�t seem to work because fDTS is directly taken from fCK_INT (see AN4776), which cannot come from TIM3 (only CK_PSC of TIM15 can come from TIM3).

Any idea of configuration allowing filtering out pulses shorter than 1.5ms while keeping FCLK=48MHz?

Many thanks!!!

Corentin

#stm32f0-input-filter
1 ACCEPTED SOLUTION

Accepted Solutions
Posted on September 22, 2017 at 18:02

Hello!

Depending on your project if has time critical issues, i suggest a software type solution.

Few microseconds are enough for 48MHZ MCU to trigger an input-capture interrupt and to judge the pulse if shorter than 1.5ms.

For very short pulses , just use the internal digital filter.

Regards

vf

View solution in original post

2 REPLIES 2
Posted on September 22, 2017 at 18:02

Hello!

Depending on your project if has time critical issues, i suggest a software type solution.

Few microseconds are enough for 48MHZ MCU to trigger an input-capture interrupt and to judge the pulse if shorter than 1.5ms.

For very short pulses , just use the internal digital filter.

Regards

vf

Corentin Zill
Associate
Posted on September 25, 2017 at 07:53

Hi Vangelis,

Thanks a lot for your reply.

In the meantime, I also went for the software solution. Not as elegant as a hardware solution, but it works perfectly.

Thanks again!

Corentin

P.S. TIM15, like all other timers, has a 16-bit prescaler. Unfortunately, it's the same problematic...