- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Solved! Go to Solution.
- Labels:
-
PSoC 5LP
- Tags:
- cypress bootloader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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