Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Basic test for periph/rtt introduced in #15431 is incorrect #15940

Closed
chudov opened this issue Feb 7, 2021 · 0 comments · Fixed by #19522
Closed

Basic test for periph/rtt introduced in #15431 is incorrect #15940

chudov opened this issue Feb 7, 2021 · 0 comments · Fixed by #19522
Assignees
Labels
Area: tests Area: tests and testing framework Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)

Comments

@chudov
Copy link
Contributor

chudov commented Feb 7, 2021

Description

Basic tests introduced in #15431 failed for RTT_FREQUENCY that are not a multiple of 2^n.
The test assumes RTT time frequency is 1 Hz, 1024 Hz, 16384 Hz or 32768 Hz.
This assumption is wrong for RTT on ATMega128RFR2 and ATMega256RFR2. On these MCU the RTT has frequency 62500 Hz because RTT is based on 802.15.4 MAC symbols counter.

Steps to reproduce the issue

Run periph_rtt test on any board based on Atmel ATMega*RFR2: deRFmega128, deRFmega256, atmega256rfr2-xpro, avr-rss2.

Expected results

Test passes for platforms that use RTT_FREQUENCY that is not a multiple of 2^n.

Actual results

RIOT RTT low-level driver test<\n>
RTT configuration:<\n>
RTT_MAX_VALUE: 0x0000ffff<\n>
RTT_FREQUENCY: 62500<\n>
<\n>
Testing the tick conversion<\n>
Trying to convert 1 to seconds and back<\n>
Trying to convert 256 to seconds and back<\n>
Trying to convert 65536 to seconds and back<\n>
error: TICK conversion not working as expected

Versions

RIOT Version: 2020.10
Compiler version irrelated to the issue

@aabadie aabadie added Area: tests Area: tests and testing framework Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) labels Feb 12, 2021
@MrKevinWeiss MrKevinWeiss added this to the Release 2021.07 milestone Jun 22, 2021
@MrKevinWeiss MrKevinWeiss removed this from the Release 2021.07 milestone Jul 15, 2021
@maribu maribu self-assigned this Jan 5, 2023
chudov added a commit to chudov/RIOT that referenced this issue Apr 28, 2023
Signed-off-by: chudov <[email protected]>
chudov added a commit to chudov/RIOT that referenced this issue Apr 28, 2023
Signed-off-by: chudov <[email protected]>
chudov added a commit to chudov/RIOT that referenced this issue May 2, 2023
chudov added a commit to chudov/RIOT that referenced this issue May 2, 2023
chudov added a commit to chudov/RIOT that referenced this issue May 2, 2023
chudov added a commit to chudov/RIOT that referenced this issue May 2, 2023
@bors bors bot closed this as completed in 34c094d May 4, 2023
zhaolanhuang pushed a commit to zhaolanhuang/RIOT that referenced this issue Dec 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: tests Area: tests and testing framework Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants