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.
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.
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.
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.
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?
i did what you suggested, but now the bootloader is resetting every after 100-150 mSec infinitely
did i miss something?
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.
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.