stm32-rs / stm32f1xx-hal

A Rust embedded-hal HAL impl for the STM32F1 family based on japarics stm32f103xx-hal
Apache License 2.0
564 stars 177 forks source link

PwmHz::get_period() crashes with division by zero. #433

Open SnVIZQ opened 2 years ago

SnVIZQ commented 2 years ago

Version: 0.9.0 How to reproduce: Set up timer with frequency of 1000Hz, then call get_period(). Expected result: Returned value of 1000Hz Actual result: Division by zero fault.

SnVIZQ commented 2 years ago

Potential solution provided in PR #434.