- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I want to be able to hold a button down when powering up the board to tell the Bootloader to wait forever for a command. If the button is not pressed while power-on, it should directly launch the application.
Is there a simple way to do this?
This is for emergencies, if for some reason the downloaded image messes up the communication with the host. Then there is no way to get back to the bootloader to download a new image. Is there another way (apart from entering a timeout of a few seconds)?
Regards,
Jostein
- Labels:
-
PSoC 5LP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Before you reply.... yes an alternative is to have a dual bootloader. I am still interested in the answer to whether we can hold a button to stay in the bootloader.
Cheers,
Jostein
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
void Bootloadable_Load (void )---
Schedules the Bootloader/Launcher to be launched and then performs a software reset to launch it.
Returns:
This method will never return. It will load a new application and reset the device.
You can call this API on a switch press,thus this API will immediately call the bootloader and the bootloader will wait for a new application forever.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have the same need, and he answer above doesn't solve it. There should be a way in the Bootloader to cause it to "Wait for Command" if it senses a button pressed on powerup. I finally got it with
if(SW1_Read()==0u) Bootloader_HostLink(Bootloader_WAIT_FOR_COMMAND_FOREVER);
But but you have to bodge the Bootloader.c and Bootloader.h files to make it non-static and exposed in the header. I remember the 4200 sticks working this way out of the box.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can call Bootloader_SET_RUN_TYPE(Bootloader_START_BTLDR)
if(Pin_bl_Read() == 0){
//BLFLAG_FOREVER = 1;
Bootloader_SET_RUN_TYPE(Bootloader_START_BTLDR);
}
/* This API does the entire bootload operation. After a succesful bootload operation, this API transfers
program control to the new application via a software reset */
Bootloader_Start();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks, I have verified that it works without altering the generated code. An ominous note in the V1.50 Datasheet says that the command CYBTDLR_SET_RUN_TYPE(x) is deprecated, and should not be used for new designs. Does that mean that Bootloader_SET_RUN_TYPE() is also deprecated? Hopefully they'll add something new before they eliminate it.