This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Can not use XTAL LF CLK source without softdevice on SDK15.

Hi everyone,

I want to set LF CLK source to XTAL without softdevice.
But, LFCLKSTAT value is 0x00010000(CKL RUN, CLK SRC = RC) after clock start.

So, I checked same test on PCA10056 board with "flash_fds" example.
and, I added followings after "cli_init();" in main.c
NRF_LOG_INFO("LFCLKSTAT = %08X", *(volatile uint32_t *)0x40000418);
NRF_LOG_INFO("LFCLKSRCCOPY = %08X", *(volatile uint32_t *)0x4000041C);
NRF_LOG_INFO("LFCLKSRC = %08X", *(volatile uint32_t *)0x40000518);

build: flash_fds/pca10056/blank/armgcc
CLOCK_CONFIG_LF_SRC 1
NRFX_CLOCK_CONFIG_LF_SRC 1

result:
<info> app: LFCLKSTAT = 00010000
<info> app: LFCLKSRCCOPY = 00000001
<info> app: LFCLKSRC = 00000001
LFCLKSTAT indicated that the clock source is RC.

build: flash_fds/pca10056/s140/armgcc
NRF_SDH_CLOCK_LF_SRC 1

result:
<info> app: LFCLKSTAT = 00010001
<info> app: LFCLKSRCCOPY = 00000001
<info> app: LFCLKSRC = 00000001
LFCLKSTAT indicated that the clock source is XTAL.

Can not use XTAL LF CLK source without softdevice on SDK15.
Why ?

emvironment
SDK: 15 (example flash_fds)
compiler: linux gcc-arm-none-eabi-6-2017-q2-update
board: PCA10056 

Thanks,

Parents Reply
  • I checked it with debugger, and I got 0x00010001 value,
    but, printf debug value is 0x00010000.

    I found new phenomenon.
    I add printf debug into main loop of main.c

    and execute it,
    register value is changed on the way.

    <info> app: LFCLKSTAT     = 00010000
                                 :
                          about 50 times
                                 :
    <info> app: LFCLKSTAT     = 00010000
    <info> app: LFCLKSTAT     = 00010001

    Why?

    Bit 16 of LFCLKSTAT is RUN state,
    and I think that bit 1-0 of LFCLKSTAT is validate at bit 16 rise timing.

    does it take long time to change RC to XTAL? 

Children
Related