Getting internal clocks to run on NRF54l15

Been trying to set up a project to run some basic openthread as a proof of concept project. I based much of it off the CLI example and SDK. I have gotten stuck where my code doesnt seem to be loading the internal clock correctly. I tried following this post as it seems very similar:

nrf54L15 LFRC 32KHz clock configuration issue - Nordic Q&A - Nordic DevZone - Nordic DevZone

but alas no. My program is currently hung up before entering main, somewhere in the clock setup. Heres the current trace:

Program received signal SIGTRAP, Trace/breakpoint trap.
nrfx_grtc_syscounter_get (p_counter=p_counter@entry=0x20016770 <z_interrupt_stacks+1696>) at C:/Users/jogarvey/Documents/git/cuelights_control_nora/modules/hal/nordic/nrfx/drivers/src/nrfx_grtc.c:282
282 *p_counter = nrfy_grtc_sys_counter_get(NRF_GRTC);
(gdb) bt
#0 nrfx_grtc_syscounter_get (p_counter=p_counter@entry=0x20016770 <z_interrupt_stacks+1696>) at C:/Users/jogarvey/Documents/git/cuelights_control_nora/modules/hal/nordic/nrfx/drivers/src/nrfx_grtc.c:282
#1 0x0004beca in counter () at C:/Users/jogarvey/Documents/git/cuelights_control_nora/zephyr/drivers/timer/nrf_grtc_timer.c:88
#2 0x0004bf10 in sys_clock_cycle_get_32 () at C:/Users/jogarvey/Documents/git/cuelights_control_nora/zephyr/drivers/timer/nrf_grtc_timer.c:434
#3 0x00005c72 in z_log_msg_commit (msg=0x200013e0 <buf32>) at C:/Users/jogarvey/Documents/git/cuelights_control_nora/zephyr/subsys/logging/log_core.c:705
#4 0x00005f3e in z_impl_z_log_msg_static_create (source=<optimized out>, desc=..., desc@entry=..., package=package@entry=0x20016808 <z_interrupt_stacks+1848> "\a", data=data@entry=0x0 <command_handler_init()>)
at C:/Users/jogarvey/Documents/git/cuelights_control_nora/zephyr/subsys/logging/log_msg.c:332
#5 0x00036f94 in z_log_msg_static_create (data=0x0 <command_handler_init()>, package=0x20016818 <z_interrupt_stacks+1864> ""\r", desc=..., source=<optimized out>)
at C:/Users/jogarvey/Documents/git/cuelights_control_nora/build/cuelights_control_nora/zephyr/include/generated/zephyr/syscalls/log_msg.h:120
#6 z_impl_k_mutex_lock (mutex=0x20000da8 <mbedtls_threading_psa_rngdata_mutex>, timeout=...) at C:/Users/jogarvey/Documents/git/cuelights_control_nora/zephyr/kernel/mutex.c:126
#7 0x0003ff9a in psa_get_initialized () at C:/Users/jogarvey/Documents/git/cuelights_control_nora/modules/crypto/oberon-psa-crypto/library/psa_crypto.c:88
#8 0x00041738 in psa_crypto_init () at C:/Users/jogarvey/Documents/git/cuelights_control_nora/modules/crypto/oberon-psa-crypto/library/psa_crypto.c:6051
#9 0x0004b954 in entropy_psa_crypto_rng_init (dev=<optimized out>) at C:/Users/jogarvey/Documents/git/cuelights_control_nora/zephyr/drivers/entropy/entropy_psa_crypto.c:19
#10 0x000639f6 in do_device_init (dev=0x6a410 <__device_dts_ord_4>) at C:/Users/jogarvey/Documents/git/cuelights_control_nora/zephyr/kernel/init.c:315
#11 0x00036c42 in z_sys_init_run_level (level=level@entry=INIT_LEVEL_PRE_KERNEL_1) at C:/Users/jogarvey/Documents/git/cuelights_control_nora/zephyr/kernel/init.c:374
#12 0x00036e1c in z_cstart () at C:/Users/jogarvey/Documents/git/cuelights_control_nora/zephyr/kernel/init.c:797
#13 0x00009dbc in z_prep_c () at C:/Users/jogarvey/Documents/git/cuelights_control_nora/zephyr/arch/arm/core/cortex_m/prep_c.c:220
#14 0x00009bc0 in z_arm_reset () at C:/Users/jogarvey/Documents/git/cuelights_control_nora/zephyr/arch/arm/core/cortex_m\reset.S:207
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb) 

Im fairly conviced the clock isnt connecting through as the syscounter doesnt seem to change (assuming i tracked it correctly)



ive been messing around with the prj.conf settings and am currently sitting at:

#
# Copyright (c) 2020 Nordic Semiconductor
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

# Enable logging for CDI messages
CONFIG_LOG=y
CONFIG_LOG_DEFAULT_LEVEL=4
CONFIG_LOG_MODE_DEFERRED=y
CONFIG_CLOCK_CONTROL_LOG_LEVEL_DBG=y
CONFIG_PRINTK=y
# CONFIG_EARLY_CONSOLE is disabled to avoid timestamp reads before GRTC is ready
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y
CONFIG_SERIAL=y

# Enable GPIO for button and buzzer
CONFIG_GPIO=y

# Enable I2C master for communicating with RPI
CONFIG_I2C=y

### OpenThread ###
CONFIG_OPENTHREAD=y

# Bluetooth or Multithread
CONFIG_CLI_SAMPLE_MULTIPROTOCOL=n # uses whatever
CONFIG_CLI_SAMPLE_LOW_POWER=n # BLE only

# Network shell
CONFIG_SHELL=y
CONFIG_OPENTHREAD_SHELL=y
CONFIG_SHELL_ARGC_MAX=26
CONFIG_SHELL_CMD_BUFF_SIZE=416

# Increase Settings storage size
CONFIG_PM_PARTITION_SIZE_SETTINGS_STORAGE=0x8000

# Enable OpenThread features set
CONFIG_OPENTHREAD_NORDIC_LIBRARY_MASTER=y

CONFIG_GPIO_SHELL=y

### Clock ###
CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y
CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC_CALIBRATION=y
CONFIG_CLOCK_CONTROL_NRF_K32SRC_250PPM=y
CONFIG_NRF_GRTC_START_SYSCOUNTER=y
in my dts i have:
&hfxo {
    status = "disabled";
};

&lfxo {
    status = "disabled";
};

&clock {
    status = "okay";
};
The code all built and ran before i added the clock stuff. I'm sure I'm missing something obvious her, software isn't my usual world. Let me know if theres more info i can add
Parents Reply Children
No Data
Related