Initialization problem

Hello,

I'm working on a custom board based on PCA10040, but it seems to be stuck at the function "lfclk_spinwait".

Comparing both schematics the only obvious difference concerning the nRF52832 is the RTC Oscillator which is not mounted in the custom board, both pins are left disconnected.

Some additional data:

  • SDK:  NCS v1.9.0
  • FW: blinky sample.

The full call stack in the image below:

I've tried unchecking the "nRF Real Timer Counter" setting, but it leads to the following building errors:

c:/ncs/v1.9.0/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: zephyr/kernel/libkernel.a(sched.c.obj): in function `z_reset_time_slice':
C:\NCS\v1.9.0\zephyr\kernel\sched.c:403: undefined reference to `sys_clock_elapsed'
c:/ncs/v1.9.0/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: zephyr/kernel/libkernel.a(timeout.c.obj): in function `elapsed':
C:\NCS\v1.9.0\zephyr\kernel\timeout.c:64: undefined reference to `sys_clock_elapsed'

Any ideas about what could be the cause?

Best regards.

Parents
  • Hi,

     

    You are stuck trying to start up the external LF clk, and I assume that your custom board does not have an external 32k source mounted.

    Can you try to add "CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y" to your prj.conf and see if this helps?

     

    Kind regards,

    Håkon

  • I've been banging my head against the wall for 3 weeks trying to get a custom NRF52810 board to work and this finally solved it. Thank you so much!

    I did notice that in order to get the build to work after setting `CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y` I needed to set `CONFIG_UART_CONSOLE` to `n`. Does this mean one must have an external LF oscillator in order to use UART?

  • Hi,

     

    I'm glad to hear that this helped you solve your issue!

    rhinodavid said:
    I did notice that in order to get the build to work after setting `CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y` I needed to set `CONFIG_UART_CONSOLE` to `n`. Does this mean one must have an external LF oscillator in order to use UART?

    The UART peripheral does not have a dependency on the LFCLK source, it only uses the HFCLK. Not sure what can have caused this issue on your end. If you still experience issues, I'd recommend that you open up a specific thread on this issue.

     

    Kind regards,

    Håkon

Reply
  • Hi,

     

    I'm glad to hear that this helped you solve your issue!

    rhinodavid said:
    I did notice that in order to get the build to work after setting `CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y` I needed to set `CONFIG_UART_CONSOLE` to `n`. Does this mean one must have an external LF oscillator in order to use UART?

    The UART peripheral does not have a dependency on the LFCLK source, it only uses the HFCLK. Not sure what can have caused this issue on your end. If you still experience issues, I'd recommend that you open up a specific thread on this issue.

     

    Kind regards,

    Håkon

Children
No Data
Related