boards/atmega256rfr2-xpro: update clock configuration/stdio baudrate + a test timeout#12649
Conversation
|
This should also be updated with the new frequency: The ATmega Arduinos which are clocked at 16 MHz are using 250 kHz (so also a clock divider of 64) for the timer. If you want to allow people testing with the internal oscillator instead of the external (as they maybe want to build a low part count board), you could go for: #define XTIMER_HZ (CLOCK_CORECLOCK / 64)That would yield the 250 kHz on 16 MHz and the current setting of 125 kHz for the internal oscillator running at 8MHz. |
Also updated by this PR: https://github.com/RIOT-OS/RIOT/pull/12649/files#diff-e605502ae9b812b7d1b514f864fcd682R41 Are you reviewing the right commit ? |
|
Weird. Somehow only part of this PR were shown in the Browser. After I pressed F5 I now can see all changes. |
It could be because I updated the branch several times (push forced) before clicking the open PR button. |
|
Here is the list of failing tests: tests/bitarithm_timings: looks like a context switching issuetests/event_wait_timeout: looks like a context switching issuetests/gnrc_*: missing network configurationtests/gnrc_ipv6_fwd_w_sub: maybe again a missing network configuration ?tests/gnrc_ndp: no idea of the problemstests/isr_yield_higher: seems like a context switch issue againtests/libfixmath: does it work on 8 bit architectures?tests/periph_eeprom: shell is not ready when launching the test but it works when run manually (or when blocking until the application is ready)tests/pipe: could be several things, maybe again context switching ?tests/pkg_jsmn: Ouput is clearly invalid. does the package support AVR ?tests/pkg_lora-serialization: seems like a conversion issue. Maybe this package is not compatible with 8bit architecture?tests/pkg_micro-ecc: reboot looptests/ps_schedstatistics: context switching issue again ?tests/stdin: application not ready when sending the character to UART |
This also fails on other ATmegas. Adding a simple print before the tests startsdiff --git a/tests/bitarithm_timings/main.c b/tests/bitarithm_timings/main.c
index c718104d23..a5db16f7b3 100644
--- a/tests/bitarithm_timings/main.c
+++ b/tests/bitarithm_timings/main.c
@@ -54,6 +54,7 @@ static void run_test(const char *name, unsigned (*test)(unsigned))
xtimer.callback = callback;
xtimer.arg = (void *) &done;
+ puts("Starting");
xtimer_set(&xtimer, TIMEOUT);
do {yields the following: So However: Those failures seem to be unrelated to this PR. So I'd say this PR can go in and the issues should be tackled in different PRs. (Would you be so kind to open an issue with the list of failing tests? Feel free to assign me some of them to investigate. I already started with bitarithm_timings.) |
|
Hmm. With |
|
I opened #12651 about the failing tests on this board (and more generally on AVR). |
This is important for a correct configuration of the external 16MHz oscillator
periph_gpio requires more time to complete on slow platforms, like AVR
0138c3e to
bd39ce3
Compare
I agree, so I think we are good here @maribu. |
|
One moment, please before merging. |
|
OK, the default baud rate of 115200 is defined in |
Contribution description
This PR is improving the atmega256rfr2-xpro clock configuration by using the available external 16MHz oscillator. This allows to use a 115200 baudrate for stdio, which is fixing some timeout with the automatic tests. There is a commit that adds some doc about how to correctly setup the fuse bytes.
This PR also provides a timeout increase for
tests/periph_gpio.There are still failing automatic tests but they are not directly related to this board. My guess is that AVR support is not working in some cases, or some tests don't support this platform at all. I will report later in detail the problems I found.
Testing procedure
Issues/PRs references
Follow-up of #12639