4 Replies Latest reply on Sep 20, 2019 3:18 AM by HemanthR_06

    Recording a constant flow of 32-bits data

    lozu_4351981

      I would like to record a constant flow of 32-bits data (using an external  synch clock - 50MHz). Can I do it with the Synch FIFO example ?
      For the moment I can receive data but every 1024 bytes there is a "gap" in my received data.

        • 1. Re: Recording a constant flow of 32-bits data
          HemanthR_06

          Hi,

           

          I think you are sending data into FX3 over GPIF. And you expect the data flow to remain continuous. In this case, instead of following the slave fifo model, you can go through the state machine of AN75779 where the data is sampled on GPIF thread 0 and when DATA_CNT is hit (which also means that a buffer is full in FX3) the data is sampled on GPIF thread 1. In this case the data flow can be continuous, provided the Host is reading the data fast enough.

           

          Regards,

          Hemanth

          • 2. Re: Recording a constant flow of 32-bits data
            lozu_4351981

            Thanks, i am investigating this at the moment.
            I cannot use the structure fully because my "source" is only providing data and a clock that I need to catch.

            Now that I have "clean" the state machine it is only two alternating thread with counters to trigger the switches from to another.

            The firmware seems way to complex for my need and rely on the interrupts I suppressed from the state machine. So I try reusing the two threads structure with the synchronous FIFO firmware example.

            I'll let you know how it goes.

             

            Isn't it a problem to switch from a thread to another ? I may be losing data during transition.

            • 3. Re: Recording a constant flow of 32-bits data
              lozu_4351981

              Thanks a lot.
              I followed this : Fx3 Streaming dropped packets? where the person share their code =) It was more clear for me to understand than AN75779

              Now I DO have a constant flow toward my USB endpoint for a while...

               

              BUT I still have packets loss after some time. when the thread are switched I miss 765k 32bits words.

              I think it is my computer not reading the data fast enough and thus not freeing the memory space in the FX3 board.
              If someone has a clue I take it all =D

              • 4. Re: Recording a constant flow of 32-bits data
                HemanthR_06

                There will be no loss due to thread switching as compared to buffer switching. So, the PC should be fast enough to empty the filled DMA buffers. If all the buffers are filled with Host not consuming them, then data will be lost.

                 

                Regards,

                Hemanth