cypress bootloader wait for command time-out

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

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.  

0 Likes
10 Replies
himam_31
Employee
Employee
50 likes received 25 likes received 10 likes received

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

0 Likes
Anonymous
Not applicable

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.  

0 Likes
Anonymous
Not applicable

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?

   

 

   

0 Likes
Anonymous
Not applicable

hi,

i did  what you suggested, but now the bootloader is resetting every after 100-150 mSec infinitely

did i miss something?

thnaks

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

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

0 Likes
Anonymous
Not applicable

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.  

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

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

   

 

   

Bob

0 Likes
Anonymous
Not applicable

Good thought.  Yes it does.  Thanks!

0 Likes
Anonymous
Not applicable

bob.marlowe Where should I add this line 'CySoftwareReset()' in the bootloader.c file?

0 Likes
Anonymous
Not applicable

Call CySoftwareReset() when the bootloader timeout occurs I would assume.

0 Likes