Skip to content

Commit

Permalink
Merge pull request #15876 from fjmolinas/backport/2021.01/pr_fix_posi…
Browse files Browse the repository at this point in the history
…x_sleep

tests/posix_sleep: fix for invalid RTT configurations  [backport 2021.01]
  • Loading branch information
jia200x authored Jan 28, 2021
2 parents 9f6e676 + d9cf7d4 commit 36e102a
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
1 change: 1 addition & 0 deletions boards/common/arduino-zero/include/periph_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@ static const i2c_conf_t i2c_config[] = {
#ifndef RTT_FREQUENCY
#define RTT_FREQUENCY (32768U) /* in Hz. For changes see `rtt.c` */
#endif
#define RTT_MIN_OFFSET (10U)
/** @} */

/**
Expand Down
2 changes: 1 addition & 1 deletion boards/common/iotlab/include/periph_conf_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ static const uart_conf_t uart_config[] = {
* @{
*/
#ifndef RTT_FREQUENCY
#define RTT_FREQUENCY (1) /* in Hz */
#define RTT_FREQUENCY (RTT_MAX_FREQUENCY) /* in Hz */
#endif
/** @} */

Expand Down
2 changes: 1 addition & 1 deletion boards/fox/include/periph_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ static const spi_conf_t spi_config[] = {
* @{
*/
#ifndef RTT_FREQUENCY
#define RTT_FREQUENCY (1) /* in Hz */
#define RTT_FREQUENCY (RTT_MAX_FREQUENCY) /* in Hz */
#endif
/** @} */

Expand Down
10 changes: 7 additions & 3 deletions tests/posix_sleep/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@ include ../Makefile.tests_common

USEMODULE += posix_sleep

# Pull-in periph-rtt on board that provides this feature to switch to the RTT
# backend of ztimer
FEATURES_OPTIONAL += periph_rtt
# These CPU families have a non configurable RTT of 1Hz, not enough for
# ztimer_msec to run on periph_rtt
ifeq (,$(filter efm32 kinetis,$(CPU)))
# Pull-in periph-rtt on boards that provide this feature to switch to
# the RTT backend of ztimer
FEATURES_OPTIONAL += periph_rtt
endif

include $(RIOTBASE)/Makefile.include

0 comments on commit 36e102a

Please sign in to comment.