You are here

fx3 usb stack reset | Cypress Semiconductor

fx3 usb stack reset

Summary: 1 Reply, Latest post by Madhu Sudhan on 24 Aug 2015 05:50 AM PDT
Verified Answers: 0
Last post
Log in to post new comments.
joseph rojas's picture
8 posts

I dont know if there is a way to reset the fx3 device without disconnecting from the usb host. Just doing a usb stack reset, is there any way to achive that?, I noticed in my application that works for the very first Gpif2 transaction but after that, and after reset the dma channel, endpoint, etc there is no way to take the app works again, sometimes its works 3 times, sometimes 8 times, but finally it crash. So again anybody know a safe way to restore the device and the usb stack to initial condition, thanks.


(I follow the lines includes in the troubleshotting guide about the way to reset dma channel keeping the endpoint in nak state.)

mady's picture
Cypress Employee
955 posts


To reset your USB Pipe:

1) Call CyU3PGpifDisable (CyTrue); (in case you are transferring data between USB and GPIF)

2) Call  CyU3PUsbSetEpNak (EndPoint Number, CyTrue); //To Set the endpoint in Nack condition

3) Put a small delay :                     CyU3PBusyWait (100);


4) Reset the DMA Channel (or channels) assosicated with USB                    

CyU3PDmaMultiChannelReset (&ChannelHandle);

5) Flush the endpoint and release the nack

  CyU3PUsbFlushEp (EndPointNumber);
                    CyU3PUsbSetEpNak (EndPointNumber, CyFalse);


When again starting the streaming again, please ensure that the CyU3PDmaChannelSetXfer, CyU3PGpifLoad and CyU3PGpifSMStart are called in the order.

There is also a warm reset in FX3 in which the firmware is loaded from the beginning again.

You need to call CyU3PDeviceReset (CyTrue); Before calling this, you need to de-initialize all the blocks that are enabled.

For example CyU3PConnectState (0,0); // for disabling USB

CyU3PUartDeInit (), CyU3PPibDeInit () to de-initialize UART, PIB Blocks etc.


- Madhu Sudhan


Log in to post new comments.