You are here

cypress bootloader wait for command time-out | Cypress Semiconductor

cypress bootloader wait for command time-out

Summary: 7 Replies, Latest post by mjones_1504731 on 04 Nov 2016 09:08 AM PDT
Verified Answers: 1
Last post
Log in to post new comments.
mjones_1504731's picture
User
7 posts

I need to use the uart bootloader and found the cypress bootloader and example from: AN68272.  The bootloader works well, but I cannot seem to get the "wait for command" time-out feature to work.  No matter the value of "wait for command" time-out  value set the bootloader never does return to the application code if a time-out has occurred.  As far as I can tell the is supposed to operate this way,  As is shown on page 5 of doc 45346. 
http://www.cypress.com/file/45346/download 

Am I missing something?  Does the "time-out" need to be manually enabled using an API?  I attached a project built for the pioneer 42 board.  

HIMA's picture
Cypress Employee
205 posts

Hello

Can you please confirm which project you have programmed. The active application will be executed only when there is a valid application present in the flash. Can you confirm if you have a valid bootloadable application in Flash while this issue is occurring.

Thanks,

Hima

mjones_1504731's picture
User
7 posts

Hi Hima,

I am using the bootloader and bootloadable1 projects.  I load the bootloader and then use the GUI to bootload bootloadable1 project.  Bootloadable1 runs fine and can re-enter bootloader upon push button, but the bootloader then never times-out and re-enters the previously running bootloadable1 application code.  So yes there is a valid bootable application loaded properly.  

Thanks for any further input you might have to this.  I must get this working and to the MFG asap.  

mjones_1504731's picture
User
7 posts

I had to dig into the source.  Either I am missing something, or the bootloader_start() function defines may not be correct in order to get the timeout function to work.  

I had to manually overwrite the Hostlink function call to set the "wait for command" option as shown in image.  Perhaps Cypress can let us know how the "wait for command" option should otherwise be implemented to work?

 

user_1377889's picture
User
9606 posts

I can assure you that bugs in components are considerably rare.

I think the original code is OK. When the application is detected as being not valid there is nothing to run, so the bootloader must wait forever.

The second #if is executed when the application is valid and will wait for the defined time.

 

Bob

mjones_1504731's picture
User
7 posts

Hi Bob,

Thanks for the comment.  It is good to hear from a user that bugs are rare.  I come from using another un-named vendor where the users are the debuggers for the drivers (not intentionally).  I have enjoyed using cypress for this reason!

I heard back from support and they cleared up how the bootloader is supposed to work.  It is only supposed to time-out when POR/XRES occurrs.  When the bootloader is entered from the application the time-out is not implemented(what I need).  Perhaps I missed this tidbit in the documentation, but could not find it.  

Anyhow the workaround above gives this functionality in case it is helpful to anyone else.  

user_1377889's picture
User
9606 posts

Try calling CySoftwareReset() in your application. There is a chance that it might work.

 

Bob

mjones_1504731's picture
User
7 posts

Good thought.  Yes it does.  Thanks!

Log in to post new comments.
RSS Back to Top
Topic locked