Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > USB Controllers > Upload new firmware without disconnect

Bookmark and Share
Cypress Developer CommunityTM
Forums | Videos | Blogs | Training | Rewards Program | Community Components



Upload new firmware without disconnect
Moderator:
RSKV

Post Reply
Follow this topic



Upload new firmware without disconnect

MarSch posted on 20 Aug 2012 4:40 AM PST
Senior Member
17 Forum Posts

Hi,

the release notes for SDK 1.2 state on p. 6 that there's a way now to reset the FX3 to the boot firmware image without the necessity to disconnect it.

Can you please detail how this is going to be done? Is there a particular USB vendor command to realize this functionality?

 

Thanks,

Markus




Re: Upload new firmware without disconnect

RSKV posted on 20 Aug 2012 06:10 AM PST
Cypress Employee
655 Forum Posts

Hi Markus,

CyU3PUsbJumpBackToBooter API has been added to the new SDK to support this feature. When you want to switch to the bootloader image you can call this API by passing the address of this 2nd stage bootloader.

For more information regarding the same, please refer to p. 414 of FX3APIGuide document.

Regards,

sai krishna.



Re: Upload new firmware without disconnect

MarSch posted on 21 Aug 2012 05:37 AM PST
Senior Member
17 Forum Posts

Thanks. According to the API description, CyU3PUsbJumpBackToBooter() provides a way to reset the device to its primary bootloader state from firmware. This however also means that the firmware must take provisions to give the user/developer access to it (which means more application code).

 

Furthermore, it requires a developer to retrieve the entry address beforehand, which is different for every firmware.

 

Did you think of getting this a bit more accessible, as like the FX2 reset (which is a call to a fixed address)? I suppose that being able to conduct a reset via a simple vendor request with a fixed address would make life simpler for the majority of developers.

 

Looking forward to your comment,

Markus

 



Re: Upload new firmware without disconnect

Sil posted on 07 Sep 2012 08:48 AM PST
Top Contributor
93 Forum Posts

Below is the verbose output of the elf2img converter. What is now the bootloader start address I need to pass as an argument?

 

-Sil

 

"C:\Cypress\EZ-USB FX3 SDK\1.2\\util\elf2img\elf2img.exe" -i SlaveFifoSync_10.elf -o SlaveFifoSync_10.img -v
Endian-ness    : Little
Note: 256 bytes of interrupt vector code have been removed from the image.
      Use the "-vectorload yes" option to retain this code.

Entry point    : 0x400220a8
Program header table offset: 0x00000034
Program header count       : 3
Program header entry size  : 0x0020
Copying data from program header:
    Addr=0x00000100 Size(words)=0x00000686 FileSize=0x00000686 Offset=0x00000100 Flags=0x00000005
Copying data from program header:
    Addr=0x40003000 Size(words)=0x00004000 FileSize=0x00004000 Offset=0x00003000 Flags=0x00000005
Copying data from program header:
    Addr=0x40013000 Size(words)=0x00003d18 FileSize=0x00003d18 Offset=0x00013000 Flags=0x00000005
Copying data from program header:
    Addr=0x40030000 Size(words)=0x00000cfe FileSize=0x00000139 Offset=0x00028000 Flags=0x00000006
' '



Re: Upload new firmware without disconnect

Sil posted on 10 Sep 2012 11:42 PM PST
Top Contributor
93 Forum Posts

Aside from the problem that I do not understand where I find the bootloader address, when calling the function  CyU3PUsbJumpBackToBooter () I get error code CY_U3P_ERROR_OPERN_DISABLED even if I set CyU3PUsbSetBooterSwitch(CyTrue) before. What is wrong here?

 

-Sil



Re: Upload new firmware without disconnect

Sil posted on 10 Oct 2012 02:12 AM PST
Top Contributor
93 Forum Posts

Meanwhile I have downloaded SDK 1.2.1 where the JumpBackToBooter functionality is demonstrated in the USBBulkSourceSink example. However, it does not work properly: I have built and stored the boot_fw to the SPI flash, so that the second stage bootloader is started after power-up. Afterwards I download the USBBulkSourceSink example to the FX3 RAM using the ControlCenter. In the device manager the FX3 device stays on the old VID&PID until I reconnect the USB cable. So there seems to be something wrong with this example. Please let me know how to solve this.

 

Regards



Re: Upload new firmware without disconnect

Sil posted on 10 Oct 2012 02:29 AM PST
Top Contributor
93 Forum Posts

Maybe I was asking the wrong question: What do I need to do when I want to re-enumerate between the second stage bootloader and the final application? I have different applications with different number of endpoints and PID&VID so I need to re-enumerate. However, it seems that JumpBackToBootloader can only work when no re-enumeration is set in CyU3PUsbStart().



Re: Upload new firmware without disconnect

RSKV posted on 11 Oct 2012 11:05 PM PST
Cypress Employee
655 Forum Posts

Hi Sil,

The main purpose of this API is to provide a mechanism to re-programm/update the firmware without disconnecting the EEPROM. So here the assumption is that USB descriptors are not changing. Anyways if USB descriptors are different then we can reset the device after downloading the new code so that it will enumerate with the new descriptors.

Thanks,

sai krishna.



Re: Upload new firmware without disconnect

RSKV posted on 11 Oct 2012 11:06 PM PST
Cypress Employee
655 Forum Posts

Correction: Without disconnecting the USB*



Re: Upload new firmware without disconnect

Sil posted on 11 Oct 2012 12:26 AM PST
Top Contributor
93 Forum Posts

But how can I reset the FX3 by software? Hardware reset is not an option as my device does not have a reset switch.

 

-Silvio



Re: Upload new firmware without disconnect

Bob Marlowe posted on 11 Oct 2012 03:04 AM PST
Top Contributor
1466 Forum Posts

Try to use

CyU3PDeviceReset(false);

 

Bob



Re: Upload new firmware without disconnect

Sil posted on 17 Oct 2012 06:11 AM PST
Top Contributor
93 Forum Posts

This did the job. Thanks.

 

-Silvio






ALL CONTENT AND MATERIALS ON THIS SITE ARE PROVIDED "AS IS". CYPRESS SEMICONDUCTOR AND ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY OF THESE MATERIALS FOR ANY PURPOSE AND DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THESE MATERIALS, INCLUDING BUT NOT LIMITED TO, ALL IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT OF ANY THIRD PARTY INTELLECTUAL PROPERTY RIGHT. NO LICENSE, EITHER EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, IS GRANTED BY CYPRESS SEMICONDUCTOR. USE OF THE INFORMATION ON THIS SITE MAY REQUIRE A LICENSE FROM A THIRD PARTY, OR A LICENSE FROM CYPRESS SEMICONDUCTOR.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms and Conditions of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms and Conditions of this site. Cypress Semiconductor and its suppliers reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.