Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
19522: tests/periph_rtt: Fix for tick conversion test r=benpicco a=chudov ### Contribution description Type casting and `printf` formatting for the `RTT_MAX_VALUE` and `RTT_FREQUENCY` are fixed so 32-bit value is properly handled by 'avr-libc'. The original tick conversion test assumes that `RTT_FREQUENCY` is power of 2 so forward and backward ticks to seconds conversion results in the original ticks value. To fix it the result of the forward-backward conversion is compared with `ticktest / RTT_FREQUENCY * RTT_FREQUENCY` that considers rounding errors. Changes were tested on deRFmega256 and nrf52840dongle. ### Testing procedure tests/periph_rtt on a board with ATmega256RFR2 shall: * show correct RTT_MAX_VALUE * conversion check shall report no error. ### Issues/PRs references Fixes #15940 Co-authored-by: chudov <chudov@gmail.com>
- Loading branch information