You are here

how to use function of CyU3PGpifSMSwitch() ? | Cypress Semiconductor

how to use function of CyU3PGpifSMSwitch() ?

Summary: 1 Reply, Latest post by RSKV on 24 Apr 2013 12:37 AM PDT
Verified Answers: 0
Last post
Log in to post new comments.
xiaosisi's picture
17 posts

now I will use the INTR_CPU of the GPIF , so i must use CyU3PGpifSMSwitch() to begin state when one buffer is trainsferred ,but I do not know how to use it ?

rskv's picture
Cypress Employee
1134 posts


Have you followed the description given in FX3APIGuide. Please let me know if you don't understand any of the below mentioned description.

CyU3PReturnStatus_t CyU3PGpifSMSwitch(
uint16_t fromState,
uint16_t toState,
uint16_t endState,
uint8_t initialAlpha,
uint32_t switchTimeout

This function is used to start GPIF state machine execution from a desired state.
This function allows the caller to switch to a desired state and continue GPIF state machine execution from there.
The toState parameter specifies the state to initiate operation from.
The fromState parameter can be used to ensure that the transition to toState happens only when the state machine
is in a well defined idle state. If a valid state id (0 - 255) is passed as the fromState, the transition is only allowed
from that state index. If not, the state machine is immediately switched to the toState. In you case you may need to give 256 if you want to switch irrespective of the current state.
The endState can be used to obtain a notification when the state machine execution has reached the designated
end state. Again, this functionality is only valid if a valid endState value is passed in.
The switchTimeout specifies the amount of time to wait for the transition to the desired toState. This is only
meaningful if a fromState is specified, and the timeout value is specified in terms of GPIF hardware clock cycles.

Log in to post new comments.