MCUBOOT Boot time

Hi ,

      How to check the time taken by the mcuboot to boot the controller(MCUBOOT Boot time) .

  • Hi,

    Could you clarify what you meant by "controller" ? 

    One easy way of measuring the booting time to turn on an GPIO pin when the device finish booting. You can use a logic analyzer or oscilloscope to measure the time when you press the reset button (or power button) until the time the GPIO pin is turned on.  

  • Thanks,

    Could you clarify what you meant by "controller" ? 

    i meant to say , mcuboot boot up time for nrf52dk_nrf52832 board. there is requirement that i need to have boot time as much as less as possible. so that is why am wondering how can i reduce it, kindly suggest.

  • I don't think there is much you can do reduce that. You can think of  turn off any logging on MCUBoot. But I don't it would have any significant effect. 
    Do you think that it's an issue with your current boot time ? Could you try to measure it ?

  • Do you think that it's an issue with your current boot time ? Could you try to measure it ?

    Yes actually , to check boot up time i have modified the mcuboot main.c as below and i was testing. am getting around 413 ms. which is too large as compared to my requirement. so that is why am curious to know what is the minimum boot up time , for nrf52832 board. 

               ZEPHYR_BOOT_LOG_STOP();
                int64_t timestamp = k_uptime_get();                     //added to check time 
                BOOT_LOG_INF("Bootloader running time:  %d",timestamp); //added to check time
                do_boot(&rsp);

    regards,

    shikamaru

  • Hi Shikamaru, 

    I can see the same booting time here. From my understanding it's the time it take for the kernel to start the 32kHz crystal. Zephyr will wait until the crystal is ready. 
    If you try this: 

    CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y
    CONFIG_MULTITHREADING=y
    In the configuration for the MCUBOOT and do this: 
    CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y
    In the configuration of your application  you will see a large reducing in your booting time. In my test it's about 60ms instead of 320ms when using crystal. 
    So what the configuration does is to change the setting to use internal RC instead of external crystal. The internal RC has faster start up time. 

    The trace off is that it may consume more current consumption when you do BLE application. The advantage is you save some components because you don't need the external 32kHz crystal. 
    Could you let me know why you need a faster start up time ? 
Related