Skip to content
  • Henrik Sölver's avatar
    stmhal/timer: Clear interrupt flag before setting callback. · 1f3887dc
    Henrik Sölver authored
    Sometimes when setting a channel callback the callback fires immediately,
    even if the compare register is set to a value far into the future. This
    happens when the free running counter has previously been equal to what
    happens to be in the compare register.
    
    This patch make sure that there is no pending interrupt when setting a
    callback.
    1f3887dc