Open
Description
The SYST.set_reload
takes a number of cycles as an argument. Even though the type of this argument is an u32
, only values that fit on 24 bits are valid. The code does document this caveat, however in practice there is no check being enforced.
As a result, it's very easy to pass a value that's too large and that will silently overflow, leading to a hard-to-diagnose incorrect behavior.
Would it make sense to add an assertion about the argument there?