Interesting Issue with board configuration - application wont start unless "kickstarted" by RTT or debugger.

nRF Connect SDK version 2.2.0

I have a custom board with a Fanstel BC840 pre-certified module. The components for the low-voltage DCDC converter are included in that package - and I have included the components to enable the high voltage DCDC regulator, and enabled both of them in the board configuration. 

I do not have a 32kHz external crystal - and instead have enabled the 32kHz source to be the RC oscillator with:

CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y
CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC_CALIBRATION=y
CONFIG_CLOCK_CONTROL_NRF_K32SRC_500PPM=y

After flashing the board - absolutely nothing expected happens (bluetooth advertising, UICR to 3.3v, ect). Cycling the supply does nothing either, neither does debugger probe reset.

The second I either start a debugging session, or connect via RTT - the board suddenly comes to life and works as expected, I can even fully disconnect the debugger from the board and everything works as it should.

If I power cycle or reset the board, it stops working again until RTT is connected.

Things I think i've ruled out:

- Issue with power supply - if this were the case, I doubt the board would work after I disconnected the debugger entirely.
- Issue with HFC in the module - for the same reason as above, bluetooth works great as long as its "kickstarted" by the debugger. 

custom_board_definition.zip0435.prj.conf






Parents Reply Children
  • with these values in the prj.conf:

    # LFC oscilator
    
    CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=n
    CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y
    CONFIG_CLOCK_CONTROL_NRF_K32SRC_500PPM=y
    CONFIG_CLOCK_CONTROL_NRF_CALIBRATION_MAX_SKIP=0



    These values end up in the (build output directory)/mcuboot/zephyr/.config
    # CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC is not set
    CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=y


    I would expect the built MCUBoot to defer to the prj.conf on its clock source - I couldnt find any MCUBoot configuration options to explicitly specify its LFC source. 

    This issue is impossible to functionally test on a DK - as the DK has the external crystal hardware on board. It will always boot on a DK because MCUBoot will use the external crystal, and then the application will use the RC oscillator. 

    To surface this issue on a DK you would need to desolder the 32kHz external crystal. 

    What can be seen without access to a board without a 32kHZ clock is the build artifacts that are referencing an external clock when the external clock has been explicitly disabled by the prj.conf. 

  • Minimal reproducible example here:

    NCS 2.4.1

    Hello world example

    added 
    CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=n
    CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y
    CONFIG_BOOTLOADER_MCUBOOT=y

    to prj.conf

    Built MCUBoot has:
    # CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC is not set
    CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=y

    In its .config. 

    3386.hello_world.zip

  • Hi,

    You could try adding CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=n to your MCUboot configuration file.

    Best regards,
    Dejan

Related