Optimize the bootup time in nRF Connect SDK 2.4.2

Hello.

My name is Stephen and I am developing a beacon device using nRF52840 and Zephyr. I am using ncs 2.4.2. I need to optimize the boot-up time. I triggered the GPIO pin in the first line of the main function and measure time interval after VDD is triggered. At then, the boot up is 21.7ms. I need to reduce the boot-time less 10ms. To disable the log, I used the following proj.conf.

CONFIG_MULTITHREADING=y
CONFIG_LOG=n
CONFIG_SERIAL=n
CONFIG_CONSOLE=n
CONFIG_PRINTK=n
CONFIG_SHELL=n
CONFIG_UART_CONSOLE=n
CONFIG_USE_SEGGER_RTT=n
CONFIG_BOOTLOADER_MCUBOOT=n

CONFIG_BT=y
CONFIG_BT_EXT_ADV=y
CONFIG_BT_PER_ADV=y
CONFIG_BT_CTLR_PHY_CODED=y
CONFIG_BT_USER_PHY_UPDATE=y
CONFIG_BT_HCI=y
CONFIG_BT_CTLR=y
CONFIG_BT_CTLR_TX_PWR_PLUS_8=y
CONFIG_BT_DEBUG_LOG=n
CONFIG_BT_DEVICE_NAME="WePower"
CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y
CONFIG_CLOCK_CONTROL_NRF_K32SRC_250PPM=y
CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=n
#CONFIG_BOARD_ENABLE_DCDC=y
# From Nordic to disable Crypto RNG
CONFIG_HW_CC3XX=n
CONFIG_ENTROPY_CC3XX=n
CONFIG_ENTROPY_NRF5_RNG=y
CONFIG_CC3XX_BACKEND=n
# Software Crypto with Mbed
CONFIG_MBEDTLS=y
CONFIG_MBEDTLS_BUILTIN=y
CONFIG_MBEDTLS_HEAP_SIZE=512
CONFIG_MBEDTLS_CIPHER_CCM_ENABLED=y
CONFIG_MBEDTLS_CIPHER_GCM_ENABLED=y
CONFIG_CRYPTO=y
CONFIG_CRYPTO_MBEDTLS_SHIM=y
# GPIO
CONFIG_GPIO=y
CONFIG_NRFX_GPIOTE=y
# I2C
CONFIG_I2C=y
CONFIG_I2C_NRFX=y
CONFIG_NRFX_TWIM0=y
CONFIG_SENSOR=y
CONFIG_LIS2DW12=y
CONFIG_LPS22HH=y
CONFIG_LPS22HH_TRIGGER_NONE=n
CONFIG_CBPRINTF_FP_SUPPORT=n

But the boot-time was not updated.  I'd appreciate it if anyone can help me to solve this issue. I attached the screenshot of boot-up time.

Thank you,

Stephen

Parents
  • Hello,

    Are you able to provide some more information about the use case? You write you need the boot time to take less than 10ms, but I want to understand why that is so I can understand what problem you are trying to solve.

    For instance if you need fast startup time you may consider using system on idle instead of power off, the difference in current consumption is ~2uA, but then the device will wakeup close to immediately, since the application don't need to boot up on wakeup.

    If you need to use system off, but also less than 10ms I don't see much alternatives, since the boot will setup the entire board (e.g. init external sensors during boot) and this will take some time. However it could still be possible to add a sys init during boot if you just need to read a pin before reaching main when using system off.

    Kenneth

  • Thank you for your reply. The device will be in the sleep mode. When reading the sensor, it will be activated. The problem is to reduce the boot-up time. The device needs to advertise the data every 20ms. So I want to reduce the bootup time to less than 20ms, if possible, 10ms. 

    If I add the sys init function, can I read the GPIO pin while booting?

    Regards,

    Stephen

Reply Children
Related