Announcements
IMPORTANT: Cypress Developer Community is transitioning on October 20th. To learn more and be prepared for this change, check out our latest announcement.
cancel
Showing results for 
Search instead for 
Did you mean: 

USB Superspeed Peripherals

Anonymous
Not applicable

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

0 Likes
11 Replies
Anonymous
Not applicable

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.

0 Likes
Anonymous
Not applicable

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

0 Likes
Anonymous
Not applicable

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
' '

0 Likes
Anonymous
Not applicable

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

0 Likes
Anonymous
Not applicable

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

0 Likes
Anonymous
Not applicable

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().

0 Likes
Anonymous
Not applicable

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.

0 Likes
Anonymous
Not applicable

Correction: Without disconnecting the USB*

0 Likes
Anonymous
Not applicable

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

0 Likes
Bob_Marlowe
Expert II

Try to use

   

CyU3PDeviceReset(false);

   

 

   

Bob

0 Likes
Anonymous
Not applicable

This did the job. Thanks.

   

 

   

-Silvio

0 Likes