1 Reply Latest reply on Apr 30, 2013 2:30 AM by ramav_01

    Change PIB clock frequency and GPIF width by EP0






      As I described in another thread, I can change the GPIF width at running time, but the setting does not take effect immediately. It becomes effective with the second packet after the change. I don't know why this happens.


      Another issue is that I failed to change PIB clock at running time. I destroyed the DMA channels and called CyU3PPibDeInit and then call CyU3PPibInit to set new frequency and create DMA channels again. I found that the PIB clock is changed, but the GPIF has no output when there is out packet from USB endpoint.


      Anyone has any idea on above issues?







        • 1. Re: Change PIB clock frequency and GPIF width by EP0





          Can you please call CyU3PUsbSetEpNak API to keep the endpoint in NAK mode for 100us before the DMA channel is destroyed. And clear the NAK condition after the channel is set up once again.


          You can do this with the help of code shown below.


          /* Cypress: Keep the endpoint NAK-ed while it is being cleaned up. */


              CyU3PUsbSetEpNak (EP_CONSUMER, CyTrue);


              CyU3PBusyWait (100);


          Once after the DMA channel is created


          /* Cypress: We can release the endpoint from NAK mode now. */


              CyU3PUsbSetEpNak (EP_CONSUMER, CyFalse);


          Please let me know the result after following this.




          Sai krishna.