Commit 1f3887dc authored by Committed by Damien GeorgeBrowse files
stmhal/timer: Clear interrupt flag before setting callback.
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.