drivers: timer: enable read synchronisation mode for the SAMD/E5x

The COUNT register on the SAMD/E5x RTC can only be read if the read
synchronisation mode is enabled.

Signed-off-by: Michael Hope <mlhx@google.com>
This commit is contained in:
Michael Hope 2020-07-02 20:52:05 +02:00 committed by Anas Nashif
parent 89466d57ea
commit 0bc3585800

View file

@ -205,6 +205,10 @@ int z_clock_driver_init(struct device *device)
uint16_t ctrl = RTC_MODE0_CTRLA_MODE(0) | RTC_MODE0_CTRLA_PRESCALER(0);
#endif
#ifdef RTC_MODE0_CTRLA_COUNTSYNC
ctrl |= RTC_MODE0_CTRLA_COUNTSYNC;
#endif
#ifndef CONFIG_TICKLESS_KERNEL
#ifdef RTC_MODE0_CTRL_MATCHCLR
ctrl |= RTC_MODE0_CTRL_MATCHCLR;