6 Replies Latest reply on Nov 29, 2018 2:09 AM by ThrimurthiM

    8 bit slave FiFO APP start and stop function.

    ThrimurthiM

      Hi all,

      I am working on Cypress fx3 GPIF II . I have doubt on "CyFxSlFifoApplnStart" and "CyFxSlFifoApplnStop" funtion in slave FIFO. This function is called inside USB event of

      CyFxSlFifoApplnUSBEventCB (CyU3PUsbEventType_t  evtype, uint16_t evdata).

      Q1. is it possible to call "CyFxSlFifoApplnStart" in SlFifoAppThread_Entry?. and what will happen ?.

      Q2. is it need to call every time CyFxSlFifoApplnStop funtion?. if it is not calling what will happen?.

       

       

      Thank you

      Best Regards,

      Thrimurthi M

        • 1. Re: 8 bit slave FiFO APP start and stop function.
          hman

          Hi Thrimurthi,

           

          1. You cannot call CyFxSlFifoApplnStart in SlFifoAppThread_Entry. Endpoint configuration is done only after the device enumerated successfully which can be known when SET_CONF is received. That is the reason CyFxSlFifoApplnStart is placed in SET_CONF USB Event.

          2. CyFxSlFifoApplnStop is called when a USB Disconnect/Reset occurs. It is necessary to disable and flush the endpoint memory and destroy the channels.

           

          Regards,

          Hemanth

          • 2. Re: 8 bit slave FiFO APP start and stop function.
            ThrimurthiM

            Thank you Hemanth sir,

             

            My problem is, I have 2 interface and 3 end point configuration.

            1. I2C Interface ( I created producer and consumer of 2 end point and 2 DAM channel with CY_U3P_DMA_TYPE_MANUAL_IN and CY_U3P_DMA_TYPE_MANUAL_OUT DAM type) I have to run in manual mode.

            2. GPIF slave FIFO ( P port as producer and USB as consumer with single end point and one DMA channel of CY_U3P_DMA_TYPE_AUTO DAM type).

             

            In my source code  have 2 ApplnStart and ApplnStop function for both I2C and GPIF Slave FIFO.

            How to call these two ApplnStart and stop function (both I2C and Slave FIFO)  in "CyFxI2CLpApplnUSBEventCB" function call back?.

             

             

            Thank you

            .

            Best Regards,

            Thrimurthi M

            • 3. Re: 8 bit slave FiFO APP start and stop function.
              keaj

              Hello Thrimurthi,

               

              You can combine both into single AppInStart and AppinStop functions.

              • 4. Re: 8 bit slave FiFO APP start and stop function.
                ThrimurthiM

                Thank you sir,

                I got Output data from P port to USB(Slave FIFO). I can view in Control center it showing 512 byte of data but all data is zero. In Master writing a incremental data it can be seen at Data Pin lines(D0 to D7) by using CRO.

                 

                1. I created 2 Flag A & B (Current thread Ready and water mark)

                2. CyU3PGpifSocketConfigure (0,CY_U3P_PIB_SOCKET_0,3,CyFalse,1);

                Pin details:

                SLOE (active High)='0';

                SLCS (active Low)='0';

                SLWR ( active High)= signal from Master side.

                SLRD( active HIGH)= '0';

                PKEND( active High)= '0';

                A0 &A1= "00"

                Is any configuration is missing?

                • 5. Re: 8 bit slave FiFO APP start and stop function.
                  hman

                  Hi,

                   

                  - You can try to put GpiftoUsb example code instead of slave firmware that you are using. And then observe the output from the device.

                  - With the current slave firmware, you can try printing few initial values of the buffer over UART.

                  - Please attach your slave .c file.

                   

                  Regards,

                  Hemanth

                  • 6. Re: 8 bit slave FiFO APP start and stop function.
                    ThrimurthiM

                    Thank you for Replay..  I Got out put..