Fix bad assertions in stm32 timer and extint.