Skip to content

drivers/periph_common: problems with starting RTC early #8914

@ZetaR60

Description

@ZetaR60

In #8842 I have had trouble with race conditions when using xtimer. This is solved by removing rtc_init from drivers/periph_common/init.c and moving it to the application (tests/periph_rtc). It seems that code in drivers/periph_common/init.c is executed before xtimer_init, which is in sys/auto_init/auto_init.c

Steps to reproduce: use xtimer_usleep in rtc_init

Expected results: xtimer functions normally

Actual results: xtimer hangs the system prior to kernel_init

Versions:

  • avr-gcc: avr-gcc (Fedora 7.2.0-1.fc27) 7.2.0
  • avr-libc: "2.0.0" ("20150208")
  • git: git version 2.14.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions