This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Cannot write to I/O port of Cypress' EZ-USB FX2 cy7c68013.

Hi everybody,
I want to write to I/O port by vendor command. But it doennot work. The firmware is like this:

	 case VR_WRITE_PORTA:  //0xD5

  		while(EP0CS & bmEPBUSY);

	 	OEA = 0xff;
		SYNCDELAY;

		IOA =  EP0BUF[0];

		SYNCDELAY;
	        EP0BCH = 0x00;
		SYNCDELAY;
		EP0BCL = 0x01; // Arm endpoint with # bytes to transfer
	        SYNCDELAY;

		EP0CS |= bmHSNAK; // Acknowledge handshake phase of device request
	 	SYNCDELAY;
		break;



Could anyone give me some suggestions, please? Thanks.

0