Issue regarding the Configuration of GRTC in nRf54L15-DK

I’m working on the nRF54L15-DK using nRF Connect SDK v3.0.2.In my project, I’m trying to enable and use the GRTC peripheral. Here's what I’ve done so far:


.overlay file (boards/nrf54l15dk_nrf54l15_cpuapp.overlay):

&grtc {
    status = "okay";
};
prj.conf:
CONFIG_NRFX_GRTC=y
CONFIG_COUNTER=y
In main.c:
#define GRTC_NODE DT_NODELABEL(grtc)
const struct device *grtc_dev = DEVICE_DT_GET(GRTC_NODE);
if (!device_is_ready(grtc_dev)) {
printk("GRTC device not ready!\n");
return;
}

However, I’m getting a linker error:
undefined reference to '__device_dts_ord_62'

This is because DEVICE_DT_GET(GRTC_NODE) resolves to a pointer using the device’s ordinal number. If the GRTC device is not marked as "okay" in the DeviceTree or its driver is not enabled in Kconfig, the symbol isn’t generated, leading to this linker error.

Have any solution for this?

Parents Reply Children
No Data
Related