Build error

Hello. I followed the steps in the video to develop a project on my custom board.

www.youtube.com/watch

I created a new board and new application (blinky sample). Then I added build configuration (I selected the custom board I created as board target).


But when I build, I get the following fatal error in the terminal: “FATAL ERROR: command exited with status 1: 'C:\ncs\toolchains\ce3b5ff664\opt\bin\cmake.EXE' --build 'c:\nordic\myApps\blinky\build'”

Soc: nrf52833qdaa

toolchains: v2.7.0

sdk: v2.7.0

Parents Reply Children
  • Hi Runsiv

    Thank you for your support.

    I think I made a mistake when I created the board. I created a new board again and now there is no build error. 

    I flashed the device, but the led did not blink. When I debugged it, I saw that the lfclk_spinwait function in clock_control_nrf.c was stuck at the following part:


    while (!(nrfx_clock_is_running(d, (void *)&type)

               && ((type == target_type)

                || (mode == CLOCK_CONTROL_NRF_LF_START_AVAILABLE))))

    {

    ...

    }

    I think there is something wrong with my clock configuration. What can I do to solve this?2526.blinky_2.zip

  • I added the following values to myboard_defconfig as in this post:

    CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y
    CONFIG_CLOCK_CONTROL_NRF_K32SRC_500PPM=y
    CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC_CALIBRATION=y
    CONFIG_CLOCK_CONTROL_NRF_CALIBRATION_LF_ALWAYS_ON=y
    Now I see the led blinking, it works fine. But is there any other way to do Clock configuration? Honestly I don't know what these values I added to myboard_defconfig mean.
  • That is good, I was looking through your files and could not find them. Our dk uses external LF crystal so if you don't have it you need to use the internal one as you do now. In Zephyr the correct way of controlling the clock is using the Kconfig

    The only one you need here is : CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y. It defaults to 500PPM when you use the internal  crystal. I would remove  CONFIG_CLOCK_CONTROL_NRF_CALIBRATION_LF_ALWAYS_ON. 

    Regards
    Runar
  • Yes, it works with internal clock source now. But there's actually a 32mHz external crystal on board. Connected to pins 28 and 29 of nrf52833qdaa (XC1 - XC2). What configuration is required for external crystal?

  • With an external you need to add:

    CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=y
    CONFIG_CLOCK_CONTROL_NRF_K32SRC_xxxPPM depending on the crystal 
    in prj.conf add:
    CONFIG_CLOCK_CONTROL=y
    Regards
    Runar
Related