Configuring, Changing, and Measuring Boot Wait Time for I2C Bootloader of CCGx Firmware – KBA228266

Version 3

    Author: LisaZ_26           Version: **

     

    Translation - Japanese: CCGxファームウェアのI2Cブートローダーの起動待機時間の設定、変更、および測定 –  KBA228266 - Community Translated (JA)

     

     

    Question 1: What is the default boot wait time for I2C bootloader?

    Answer 1: Bootloader waits for a default timeout of 32 ms for I2C bootloader of CCG1/CCG2 and 50 ms for I2C bootloader of CCG3, CCG4, CCG4M, CCG5, and CCG6.

     

    Question 2: Which macros are related to the boot wait window of I2C bootloader in the SDK firmware project?

    Answer 2: The following macros in the boot.h file are related with the boot wait window of the I2C bootloader:

     

    #define CCG_BL_WAIT_DEFAULT                             (50)

    /**< Default boot-wait window for CCGx boot-loader: 50 ms */

     

    #define CCG_BL_WAIT_MINIMUM                             (20)

    /**< Minimum boot-wait window duration supported: 20 ms */

     

    #define CCG_BL_WAIT_MAXIMUM                             (1000)

    /**< Maximum boot-wait window duration supported: 1000 ms */

     

    #define CCG_FWMETA_APPID_WAIT_DEF                       (0xFFFFu)

    /**< FW metadata application ID value requesting default boot-wait window. */

     

    #define CCG_FWMETA_APPID_WAIT_0                         (0x4359)

    /**< FW metadata application ID value requesting a zero boot-wait window. */

     

    Question 3: How do I change the tBootWait period from 50 ms to 0 ms in the firmware project?

    Answer 3:  You can change the tBootWait period from 50 ms to 0 ms by changing the Application ID of the parameter “Bootoadable_1” from 0xFFFF to 0x4359 in the firmware project as shown in
    Figure 1.

    Figure 1. Changing Bootloadable_1 Parameter

      

     

    Question 4: How can I measure tBootWait in the system?

    Answer 4: You can measure the tBootWait time period by adding a timer function. This function is called once the boot_start sequence initializes for a non-zero wait time defined by the variable boot_get_wait_time();.

    See the following code snippet and the function timer_start() for more details.