Re: Using counter (with RTC) on #nrf52832
As written before “Note that for other drivers enabling instances happens in Device Tree. Counter will be aligned to that at some point.”.
We are going towards instances being enabled in DT and counter is not yet there.
From: Diogo Correia <diogo.correia@...>
Sent: Friday, August 7, 2020 11:08 AM
To: Chruściński, Krzysztof <Krzysztof.Chruscinski@...>; users@...
Subject: Re: [Zephyr-users] Using counter (with RTC) on #nRF52832
CMake is complaining because even though COUNTER driver is enabled there is no COUNTER instance enabled. In the example there is a Kconfig (samples/drivers/counter/alarm/Kconfig) which enabled COUNTER_RTC0 for Nordic platform and you need to do the same.
Note that for other drivers enabling instances happens in Device Tree. Counter will be aligned to that at some point.
I've started using Zephyr OS last week, so is better to advise that there might be a tiny chance of this question being dumb. I'm trying to use the Nordic's nRF52832 RTC clock, so wrote a small piece of software (based on the samples/counter/alarm/ example). However, when trying to compile I receive the following error:
CMake Error at /home/diogo.correia/zephyrproject/zephyr/cmake/extensions.cmake:372 (add_library):
My .conf file:
#Nordic nRF52 RTT LOGGER
My .c file:
struct device *counter;
struct counter_alarm_cfg alarm_config;
counter_callback(struct device *counter_dev,
counter = device_get_binding(TIMER);
if (counter ==
printk("ERROR: %s not found.\n",
alarm_config.callback = counter_callback;