CONFIG_BOOTLOADER_MCUBOOT setting cause block in lfclk_spinwait

Hello I'm in trouble with nRF52833 module MDBT50Q-DB-33(with no 32kXtal)
in nrf connect sdk v2.3.0

I remove the 32k clock for new designed board and test with MDBT50Q-DB-33.
I use peripheral_sc_only and when I add

CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y
CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC_CALIBRATION=y
CONFIG_CLOCK_CONTROL_NRF_K32SRC_20PPM=y

and it's ok , can use bluetooth, can connect from nRF Connect for Desktop.

but I try DFU and I add

CONFIG_BOOTLOADER_MCUBOOT,

then it don't get out of "lfclk_spinwait". no come to main.

why this happened and how to solve it?
I trace with debugger and can not detect difference(means looks same code).

and now I noticed in "lfclk_spinwait", debugger said...

HFCLKSTARTED not 1(= not started) and LFCLKSRC =Xtal
when set CONFIG_BOOTLOADER_MCUBOOT

I just want clock setting is 

CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y
CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC_CALIBRATION=y
CONFIG_CLOCK_CONTROL_NRF_K32SRC_20PPM=y

and want use finally DFU
Could you please help me to specify correct LFCLK setting on MCUBOOT(for DFU)

thanks

Parents
  • Hey Taizo,

    I think you need to set the proper configs for the MCUBOOT child image as well as your application. I think the child image defaults to the nRF52833DK configs where LFXO is used. 

    Also, I don't think you can achieve 20PPM accuracy with the RC oscillator even with aggressive calibration, try 250PPM.

    BR,
    Håkon Holdhus. 

  • > I think the child image defaults to the nRF52833DK configs where LFXO is used. 
    how to change child image's clock setting? is there any tutorials?

    > try 250PPM.

    got it,

    thanks

  • taizo.kusunoki(DDDS) said:
    how to change child image's clock setting? is there any tutorials?

    You can study samples that use our boards and mcuboot. Some have a .conf file for the mcuboot child image.

  • please advice me sample name more in detail,

    for example I chose "hci_pwr_ctrl" that sampe that have child_image dir and hci_rpmsg.conf in it,

    and I edit hci_rpmsg.conf with error happen word but build success,
    that means no refer child_image/hci_rpmsg.conf. even add 
    CONFIG_BOOTLOADER_MCUBOOT=y

    so please give me more detail how to change child image's setting.

    thanks

  • finally I can find it. build log said that:

    Building peripheral_sc_only
    …(omitted)

    [0/1] Re-running CMake...
    …(omitted)
    Parsing C:/ncs/v2.3.0/zephyr/Kconfig
    …(omitted)
    Loaded configuration 'C:/ncs/v2.3.0/nrf/boards/arm/nrf52833dongle_nrf52833/nrf52833dongle_nrf52833_defconfig'
    Merged configuration '[some user dir] /peripheral_sc_only/prj.conf'
    …(omitted)
    === child image mcuboot - begin ===
    loading initial cache file [some user dir]/peripheral_sc_only/build/mcuboot/child_image_preload.cmake
    …(omitted)
    Loaded configuration 'C:/ncs/v2.3.0/nrf/boards/arm/nrf52833dongle_nrf52833/nrf52833dongle_nrf52833_defconfig'
    Merged configuration 'C:/ncs/v2.3.0/bootloader/mcuboot/boot/zephyr/prj.conf'
    Merged configuration 'C:/ncs/v2.3.0/nrf/subsys/partition_manager/partition_manager_enabled.conf'
    Merged configuration '[some user dir]/peripheral_sc_only/build/mcuboot/zephyr/misc/generated/extra_kconfig_options.conf'
    Configuration saved to '[some user dir]/peripheral_sc_only/build/mcuboot/zephyr/.config'
    …(omitted)

    MCUBoot bootloader key file: C:/ncs/v2.3.0/bootloader/mcuboot/root-rsa-2048.pem
    (continue buildng...)

    I can see child image mcuboot NOT LOAD (project dir)/prj.conf but load  (board setting)_defconfig
    so I simply add CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y option into (board setting)_defconfig
    so I can see DFU icon without 32kHz xtal.

    thanks anyway I can go next.

  • From the latest reply, this issue is because MCUboot doesn't get the CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC configuration applied.

    If your project works with custom board files and does not have 32kHz crystal, then changing the (board)_defconfig file is a good approach.

    Alternatively, you could also add the configuration to the MCUboot image. The simplest way is to add it to child_image/mcuboot.conf. Refer to the multi-image build documentation for more details and other methods.

Reply Children
No Data
Related