4 Replies Latest reply on Jul 26, 2020 9:51 PM by MaMi_1205306

    PSoC5LP :Transition of USB FS component to suspend mode in Bootloader processing




      We are configuring PSoC5LP with Dual-application Bootloader.

      In other words, Bootloader and Application (Bootloadable) projects are separated.


      In the Bootloader program,

      After calling USBFS_CheckActivity() in the CY_ISR() function using the timer interrupt,

      Suspending the USB FS component and putting the system into sleep mode.


      Are there any problems with the above procedure and operation?


      We would like to reduce the amount of processing in the CY_ISR() function that is the interrupt processing,

      When the CyBtldr_Start() function is called,

      the loop processing of the automatically generated program will be executed,

      and control will not return from the function, so the above processing is performed.


      Is there any other way to temporarily return control after calling the CyBtldr_Start() function.



      The red letters in the above flow chart correspond to the flow.




        • 1. Re: PSoC5LP :Transition of USB FS component to suspend mode in Bootloader processing

          Hello MaMi_1205306


          As you have correctly mentioned that the Bootloader_Start() function does not return. Thus it is not possible to check for the USB activity in the main function once the Bootloader_Start is called.


          The method and steps suggested by to check the activity of USB in the Timer_ISR seems to be correct. I tried triggering the Timer interrupt after calling the bootloader_start and it is working for me.


          Can you please let me know by dual application bootloader do you mean one bootloader Project and two application projects (two bootloadable projects) or are you referring to the classic bootloader application which consists of one bootloader project and one bootloadable project?


          Are you using the USBFS component only as a communiation interface while bootloading?


          In case you are using the dual bootloader application and USBFS component is used only for communication then you can use the Launcher project instead. It has a bootloader project that is defined through incorporation of a Bootloader component without a communication component. The Bootloader only performs the switching function. The applications can update each other. The applications are allocated an equal amount of flash space.


          Please refer to the Bootloader/Bootloadable datasheet for more information on this: https://www.cypress.com/documentation/component-datasheets/bootloader-and-bootloadable


          Please let me know if you have further queries related to this.


          Best Regards


          • 2. Re: PSoC5LP :Transition of USB FS component to suspend mode in Bootloader processing



            Thank you for you response.


            Dual Bootloader consists of one Bootloader and two Bootloadables.


            When Bootloader is running,

            We are using the USBFS component as an interface for data communication.


            Dual-application, even if one Bootloadble is damaged,

            It is used by assuming that the other bootloadble will start after switching.

            We do not consider updating the firmware of one Bootloadble while it is running.


            As a basic operation,

            While the Bootloader is running, it is configured not only to rewrite the firmware in the Bootloadable area but also to update the EEPROM data via USB from the host GUI application.


            After the Bootloader_Start() API is called,

            Is it not recommended to perform other interrupt processing?



            • 3. Re: PSoC5LP :Transition of USB FS component to suspend mode in Bootloader processing

              Hello MaMi_1205306


              It is possible to perform interrupt processing.

              I tried creating a Bootloader project and performed a task by triggering the interrupt after calling the Bootloader_Start function. I had configured my Bootloader to wait forever.


              The project was working properly for me. So there should be no issue with the steps mentioned by you in your first response.


              Are you facing any issues while running your project?


              Best Regards


              • 4. Re: PSoC5LP :Transition of USB FS component to suspend mode in Bootloader processing



                We are considering two interrupt actions after calling Bootloader_Start().


                One is a timer interrupt,

                The other is GPIO interrupt by UART.


                After calling the CyBtldr_Start function,

                UART reception cannot be performed in the CY_ISR function executed by the timer interrupt.

                Before the CyBtldr_Start function is called, data can be received from the UART by the same processing.


                When the interrupt priority of UART RX and TX is set to the highest priority (priority 0),

                UART reception is now possible.


                for that reason,

                We are wondering what to do with the priority of interrupts in Bootloader_Start.

                If the interrupt during Bootloader_Start is okay,

                Make sure to design only the priority.


                However, why during Bootloader_Start,

                UART interrupt is not enabled at timer interrupt,

                Before Bootloader_Start,

                We don't know if UART interrupt is enabled during timer interrupt.