Main loop bootup delay

Hi,

We have a project using nrf 2.2.0 with the following features enabled:

  • BLE
  • Openthread
  • Lwm2m
  • PWM + timers
  • Console
  • External storage for OTA over lwm2m
  • MCUBoot

I mention the above as our problem is that on bootup, we get a constant delay of 30 seconds before the main loop executes.

During this 30 seconds the console works and takes input (see above). However the main function is not executed, see below how it first prints a bootup message. This message takes 30 seconds to appear on the above image.

We didn't have this issue when we were using nrf 1.9.x awhile back.

Do you have any suggestions of what this could be?

I've also uploaded the Zephyr generated config file, as i'm guessing it might be something in there. Let me know if you need any more information.

Thanks for your time!

https://pastebin.com/XcdsHevk 

  • Think i've found the problem after months of waiting 30 seconds on boot up haha.

    When you enable openthread but have CONFIG_OPENTHREAD_MANUAL_START=y; you get a timeout condition on network config init. I guess because there is no network at that time.

    Changing "CONFIG_NET_CONFIG_INIT_TIMEOUT=4" will give you a 4 second delay on boot up instead of the default 30. 

    I dont think this is a solution so to speak, as surely the network should not attempt to config if the app code is controlling when openthread is enabled.

    I'll update on progress.

  • The problem is you need to stop Zephyr configuring networking on boot up; if your controlling or deferring when networking is enabled.

    Add the following to your conf and there will be no boot delay.

    # Thread network is not going to connect on bootup, hence if we enable this
    # we will end up waiting for a timeout set in CONFIG_NET_CONFIG_INIT_TIMEOUT
    CONFIG_NET_CONFIG_AUTO_INIT=n

    Hope that helps someone :) 

Related