/* Warning RTOS timer resolution is 30.5 us. This is called by two code paths: */
uint32_t sys_clock_cycle_get_32(void)
/* Warning RTOS timer resolution is 30.5 us. This is called by two code paths: */
uint32_t sys_clock_cycle_get_32(void)
{
	uint32_t ret;
	uint32_t ccr;
	k_spinlock_key_t key = k_spin_lock(&lock);
	ccr = timer_count();
	ret = (total_cycles + (cached_icr - ccr)) & TIMER_COUNT_MASK;
	k_spin_unlock(&lock, key);
	return ret;
}