Hi,
I noticed that when using nrf5340 and it's kernel timer driver, that the k_cycle_get_64() API is not available, and that TIMER_HAS_64BIT_CYCLE_COUNTER is not being set when compiling for nrf5340 SoC. This gets selected when using GRTC for nrf54 devices.
I don't understand why, because checking the driver implementation, I can see that the 32 bit variant in sys_clock_cycle_get_32() is using the 64 bit result of z_nrf_rtc_timer_read() and casting it to uin32t_t. If I understood right the RTC peripheral is using 24 bit counter and already handles the count + overflow logic in a 64 bit counter, so is there any reason why sys_clock_cycle_get_64 could not be implemented by just returning z_nrf_rtc_timer_read() return value, and TIMER_HAS_64BIT_CYCLE_COUNTER selected automatically by the driver ?
We would love to use k_cycle_get_64() in our platform that is using both nrf53 and nrf54 SoC family products for accurate data timestamps, so it would be much appreciated if this would work for nrf5340.
Thank you in advance for your answer,
Best regards,
Jimmy