input stamper: add deglitching

master
Robert Jördens 2021-02-04 12:47:35 +01:00
parent f250e036ca
commit 7ce90c4d31
1 changed files with 4 additions and 0 deletions

View File

@ -47,6 +47,10 @@ impl InputStamper {
let input_capture =
timer_channel.into_input_capture(timers::tim5::CaptureSource4::TI4);
// FIXME: hack in de-glitching filter
let regs = unsafe { &*hal::stm32::TIM5::ptr() };
regs.ccmr2_input().modify(|_, w| w.ic4f().bits(0b0011));
Self {
capture_channel: input_capture,
_di0_trigger: trigger,