You are here

GPIF-II Counter Setting | Cypress Semiconductor

GPIF-II Counter Setting

Summary: 2 Replies, Latest post by jf6405_1607811 on 25 Nov 2016 05:15 PM PST
Verified Answers: 0
Last post
Log in to post new comments.
jf6405_1607811's picture
8 posts

Hi, my problem is how to let "LOADB->SCTRL_1->M_1->...->SCTRL_4->COUNT " display 10 cycle? Now I use logic one to keep transfering from one state to another state. I try some method like "!DATA_CNT_HIT" to let the transition stop when the COUNT_DATA hit the limit, but it failed. Could someone show me the correct method to only run the period for 10 times ? Thank a lot.

lis_user1's picture
32 posts

Add a "IDLE" state, DATA_CNT_HIT moves from COUNT to IDLE. 

!DATA_CNT_HIT moves from COUNT to LOADB. 

IDLE state as a trap state. 


jf6405_1607811's picture
8 posts

Dear Lis, thank you. It really went to the trap state.

I still wonder whether is the solution in Eclipse that I can use the "while( )" function to run in code. And Eclipse's method also need to fit the clock. All I do recently was building state machine in GPIF-2. Then included "cyfxgpif2config.h" in Eclipse. In code I found below describe:
/* Start the state machine. */
    apiRetStatus = CyU3PGpifSMStart (START, ALPHA_START);
    if (apiRetStatus != CY_U3P_SUCCESS)
        CyU3PDebugPrint (4, "CyU3PGpifSMStart failed, Error Code = %d\n",apiRetStatus);

Where can find the next step after"CyU3PGpifSMStart( START, ALPHA_START )" ? Like how the "COUNT --> DATA_COUNT_HIT---> IDLE"  in code ?  If I want to use Eclipse's method,  I  can go to the state machine built by GPIF-2 and use  "while( ) " make it work?

Please tell me can this work or not, I am a newbie in these software. Thanks!!!

Log in to post new comments.