You are here

Make bootloader wait for command when pushing a button | Cypress Semiconductor

Make bootloader wait for command when pushing a button

Summary: 2 Replies, Latest post by ANKS on 24 Nov 2016 10:48 PM PST
Verified Answers: 1
Last post
Log in to post new comments.
Svinaldo's picture
User
5 posts

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

Svinaldo's picture
User
5 posts

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

ANKS's picture
Cypress Employee
88 posts

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.

Log in to post new comments.