stm32-rs / stm32g0xx-hal

Peripheral access API for STM32G0 series microcontrollers
Apache License 2.0
72 stars 51 forks source link

Stopwatch::elapsed truncates 32 bit timer TIM2 to 16 bits #112

Closed davidlattimore closed 2 years ago

davidlattimore commented 2 years ago

90 changed Stopwatch::elapsed to do a wrapping_sub using u16 instead of u32. TIM2 on stm32g0x1 is 32 bits. See RM0444 "22.2 TIM2/TIM3/TIM4 main features".