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.
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?
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?
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,
We don't know if UART interrupt is enabled during timer interrupt.