Reset FX3 by Cypress vendor command

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

cross mob
Anonymous
Not applicable

Hi,

   

 

   

to my knowledge, the only way to perform a cold reset on the FX3 - apart from pulling the switch - is by using an API call.

   

This requires the implementation of a vendor command within the firmware that in turn calls CyU3PDeviceReset(). However, this approach is not generic at all. It requires either particularly tailored upload code or manual intervention.

   

It would be extremely helpful if there was a Cypress defined vendor command that enabled a reset of the FX3 independent of the firmware running on the device.

   

Would you mind to implement this?

   

 

   

Best regards,

   

Markus

0 Likes
3 Replies
Anonymous
Not applicable

 hi,

   

 

   

Currently we do not have any such vendor command. What we have is the API "public bool Reset ( ). Member of CyUSB.CyUSBDevice", which in turn does the same as WdfUsbTargetDeviceResetPortSynchronously (http://msdn.microsoft.com/en-us/library/windows/hardware/ff550097(v=vs.85).aspx). This effectively resets the USB port.

   

 

   

Regards,

   

Gayathri

0 Likes
Anonymous
Not applicable

Hi,

   

 

   

the downside is, as mentioned, that you have to implement the reset functionality within the firmware.

   

It would make more sense to have it globally available (as with the FX2), particularly for the development process. It would also aid firmware loading tools in flashing the code without a manual reset, which disrupts the workflow and requires the device to be within reach.

   

BTW, libusbx does now support FX3 flashing officially (that's how I actually came over it again).

   

When looking at the number of readers for this request, I got the impression that this is quite interesting to a lot of people developing on the FX3. Please consider implementing this feature.

   

 

   

Regards,

   

Markus

0 Likes
Anonymous
Not applicable

Hi MarSch,

   

See Cypress request 0xA0. Boot loaders implement this for loading images into FX3 RAM. You can add this into your own applications as well.

   

I personally use such a simple macro for resetting FX3:

   

#define ResetDevice() do { *(volatile uint32_t *)0xe0050000 &= ~(1<<31); } while(1)

   

This is maximal 6 ARM instructions, total 24 bytes. Load these 6 instructions into FX3  RAM and jump there.

   

Br,

   

kalev

0 Likes