1 Reply Latest reply on Jan 9, 2018 3:03 AM by geon

    bootloader - skip wait period with i2c command

    alexander.roscoe_2373731

      I have a long wait period setup in the configuration and I would like to skip it if I dont have a new firmware to write. Is there an i2c command I can issue to start it?  I was looking in the Bootloader_PVT header and I didn't see anything straight forward.

        • 1. Re: bootloader - skip wait period with i2c command
          geon

          Hello Alex,

           

          On device reset, the bootloader can wait for a command from the bootloader host specified by the wait time. When you want to skip the wait time; validate the available bootloadable application, upon success schedule the bootloadable image and perform a software reset. The appended code monitors a Pin to switch between bootloader and bootloadable. Similarly, you may monitor the I2C channel for a user command.

           

          int main()

          {

              /* Place your initialization/startup code here (e.g. MyInst_Start()) */

              CyGlobalIntEnable;

           

              if(Pin_Read()==0)

              {

                  /* Start bootloader communication. This will wait for bootloading as configured by Wait for command*/

                  Bootloader_Start();

              }

              else

              {

                 

                  /* Validate and schedule bootloadable. Perform software reset*/

                  if(CYRET_SUCCESS == Bootloader_ValidateBootloadable(Bootloader_activeApp))

                      {

                          Bootloader_SET_RUN_TYPE(Bootloader_SCHEDULE_BTLDB);

                          CySoftwareReset();

                      }

               

              }

           

              for(;;)

              {

                  /* Place your application code here. */

              }

          }

           

          Best Regards,

          Geona Mary