We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi, The code to initiate te GPIF write is given below. I use LED blinking for debugging the code stage. At initial condition GPIFDONE bit is high (meaning GPIF engine is idle.) when I initiate a write operation using CYconsole, it sets the EP24FIFOFLGS register, which was verified with a vendor command. As long as the GPIFTRIG=GPIF_EP2 is commented, the debug led blinks. when the above command is included, the Debug led stalls, meaning GPIF write operation is not executed. Any known reason for this.
already similar thread has been made at http://www.keil.com/forum/docs/thread13370.asp.
void TD_Poll(void) { if( GPIFTRIG & 0x80 )// if GPIF interface IDLE { if ( ! ( EP24FIFOFLGS & 0x02 ) ) // if there's a packet in the peripheral domain for EP2 { if ( EXTFIFONOTFULL )// if the external FIFO is not full { if(enum_high_speed) { SYNCDELAY; GPIFTCB1 = 0x01; // setup transaction count (512 bytes/2 for word wide -> 0x0100) SYNCDELAY; GPIFTCB0 = 0x00; SYNCDELAY; } else { SYNCDELAY; GPIFTCB1 = 0x00; // setup transaction count (64 bytes/2 for word wide -> 0x20) SYNCDELAY; GPIFTCB0 = 0x20; SYNCDELAY; } Setup_FLOWSTATE_Write(); // setup FLOWSTATE registers for FIFO Write operation SYNCDELAY; if (++LED_Count == 10000) { if (LED_Status) { LED_Off (bmBIT0); LED_Status = 0; } else { LED_On (bmBIT0); LED_Status = 1; } LED_Count = 0; } //GPIFTRIG = GPIF_EP2; // launch GPIF FIFO WRITE Transaction from EP2 FIFO //SYNCDELAY; while( !( GPIFTRIG & 0x80 ) ) // poll GPIFTRIG.7 GPIF Done bit { ; } SYNCDELAY; } } }
regards, Jag