4 Replies Latest reply on Jul 20, 2012 2:48 AM by silvio.ziegler







      In my application I want to use CyU3PGpifSMSwitch():




      CyU3PGpifSMSwitch (
              uint16_t fromState,             /* The state from which to do the switch to the desired state. */
              uint16_t toState,               /* The state to which to transition from fromState. */
              uint16_t endState,              /* The end state for this execution path. */
              uint8_t  initialAlpha,          /* Initial Alpha values to use when switching states. */
              uint32_t switchTimeout          /* Timeout setting for the switch operation in GPIF clock cycles. */




      According to the API documentation state switching is only carried out if the state machine is in "fromState" or "fromState" is not a valid state (>255). In my application I would like to define "fromState" larger than 255 to force state switching all the time. However, there is different behaviour between using the values 257, 0xFFF and 10 (which is the actual state derived from CyU3PGpifGetSMState()). When using 257, the state machine crashes after stepping trough this instruction around 1-10 times. If 0xFFFF is used, then I can reset the state machine up to 32'0000 times. When using 10, which is the actual state, commiting DMA buffer fails afterwards with error message 71 (CY_U3P_ERROR_INVALID_SEQUENCE).




      Has anyone a good explanation for this behaviour? Thanks for help.