3 Replies Latest reply on May 18, 2015 2:49 AM by userc_41454

    FX3 GPIF Waveform REPEAT_COUNT explaination required





      I've created a waveform which includes 2 wait states (simple delays, using repeat count). By looking at the generated configuration file, I've seen that the REPEAT_COUNT field is changed for the states which are connected to the wait states but no in the wait states. I expected to find the REPEAT_COUNT field set only in these states (from the FX3 TRM, it's defined as 'Number of times to stay in this state -1', so if I want to stay in the wait state, the REPEAT_COUNT field should be set only for the required states, not for the state which jump to this wait state).




      Here is a snippet of the transition code generated. As you can see, the states affected are states 1, 3 and 5, where I expected states 2 & 4 being changed. I've attached the project file.


      My main question is : Is it normal ? If so, then I will make my code to work in this way, if not, then there might be a bug in GPIF designer.




      #define START_WAITSTATES            0
      #define DMAWAIT_WAITSTATES          1
      #define WAITSTATE_S0_WAITSTATES     2
      #define READDATA_S0_WAITSTATES      3
      #define WAITSTATE_S1_WAITSTATES     4
      #define READDATA_S1_WAITSTATES      5




      CyU3PGpifWaveData CyFxGpifWavedata_WaitStatesConfig[]  = {




      Regards, Jerome

        • 1. Re: FX3 GPIF Waveform REPEAT_COUNT explaination required



          Can you please attach the whole state machine project? (I.e including the xml files)




          -Madhu Sudhan

          • 2. Re: FX3 GPIF Waveform REPEAT_COUNT explaination required



            Here is the whole project attached.




            I've checked with an oscilloscope and it seems that the timings are correct. I just have to apply delays to the waveforms 'pointing' to the states that require wait state instead of inside the wait_states waveforms. Quite strange but you might be able to explain me this point.




            During the tests with the GPIOs as 'debug' probes, I've also came to an other problem. I use the DATA_COUNTER and ADDRESS_COUNTER to count datas that must be sampled in states READ_S0 and READ_S1.


            I've tried to reset the counter on wait_states, but it didn't worked. I had to place the LD_DATA_COUNTER and LD_ADDRESS_COUNTER in the READ_Sx states, otherwise it didn't worked (I can recreate the problem quite easily and send you both project and screenshot of the oscilloscope connected to the 4 gpios. Does the problem comes from the fact that I've unchecked the 'Repeat actions until next transition' for the WAIT_STATES_x states ?


            Here again I'd like to know the problem so that I can put a special note somewhere to avoid doing the same 'debug' on the products (I've spent a whole day trying to debug this).




            Regards, Jerome

            • 3. Re: FX3 GPIF Waveform REPEAT_COUNT explaination required

              Couldn't edit the post to upload file. here it is.




              EDIT : Cannot upload file even if I selected it...can I send it to your mail ?