USB low-full-high speed peripherals Forum Discussions
I'm having an issue with EP0BUF. Is it double buffered?
I've written a few control endpoint vendor functions to handle some low load functions in our firmware (transferring a few bytes). I've got most of the functions working which just do a single read, read two bytes, a write followed by a read, etc. Only one of these functions uses data from the PC in EP0BUF.
I have a switch statement which parses SETUPDAT[1]. The part that reads EP0BUF is here:
case VR_WRITE_N:
//Write n bytes, buffer has data, addr, data, addr
//wValue = 0,0 SETUPDAT[3],SETUPDAT[2]
//wIndex = 0, 0 SETUPDAT[5],SETUPDAT[4]
//wLength = 0, len SETUPDAT[7],SETUPDAT[6]
for(i=0;i<SETUPDAT[6]; i++)
{
dat = *(EP0BUF+i);
addr = *(EP0BUF+i+1);
i++;
WriteByte(dat,addr);
IOA = i;
}
EP0BCH = 0;
EP0BCL = 0; // Arm endpoint with # bytes to transfer
EP0CS |= bmHSNAK; // Acknowledge handshake phase of device request
break;
WriteByte just sets addr to Port C and dat to Port B and then does a write cycle on a proprietary data bus connected to those ports.
The data that goes out on the bus is always one cycle old. For example:
1) Start device and initialize
2) PC writes several bytes to EP0 with vendor code VR_WRITE_N
3) First time, data out on the bus is random garbage
4) PC writes another set of bytes to EP0 with VR_WRITE_N
5) Data on the bus is the first data set sent.
WriteByte works because I use it for the single byte write functions which pass the address and data in wValue and wIndex and doesn't use EP0BUF. The only time I see a problem is with the VR_WRITE_N function. How do I get EP0BUF to have the latest data from the PC?
Bill
Show LessHello,
Just a heads up on the product we already have..The product has a cypress CY7C68013A (USB controller) and is working on windows. We are planning to add support for the linux distrubutions also.
Few questions regarding this requirement:
1) Do we have any support for building the USB Firmware on linux side from Cypress?
2) What about the tools to test the firmware on linux host?
3) Do we have any example projects to give an idea about the same?
4) What about the linux drivers for CY7C68013A series of chips like the one we have for windows( cyusb.lib/dll)?
5) Any supporting documents to start compling code in linux?
Thanks
SJ
Show LessIt looks like this forum doesn't have a lot of activity. Hopefully someone can answer a simple question.
I'm a bit confused about the default levels of the CTL output lines used by GPIF. Looking at the data sheet, it appears they default to 1 and this is controlled with the GPIFIDLECTL register. However, the only code example I could find that referenced this register had comments that looked more like it was talking about FLOWEG0CTL or FLOWEG1CTL.
If I wanted the CTL lines all == 0 when not in use, would I write 0x00 to GPIFIDLECTL at initialization?
Thanks,
Bill
Show Lesshi ,everyone,
I am developing host-side software application . In the former version ,it used on ReadFile/WriteFile with overlapped to Read/Write usb bus,and WaitForMulitObjects waits for 2 events ( one for USB operation signal , one for UI operation signal)
now, I need re-write the code base on cyUSB.sys. CyApi.lib is a good choice but WaitXfer is wrapped WaitForSingleObject,NOT WaitForMultiObjects,
I would like to know the below:
1,May I just use cyioctl.h and DeviceIoControl to Read/Write the cyusb.sys ?
2, Is that corrected :
BeginXfer is exactly equal with DeviceIoControl(hDevice, IOCTL_ADAPT_SEND_NON_EP0_TRANSFER.....),
which means there is no others addtional DeviceIoControl operation
3, where and how can I get the source code of cyapi.lib ,I think it very.....very helpful.
thx.
Show LessIs it possible to configure FXLP2 in a way that, once triggered, GPIF continuously flushes endpoint data to external FIFO - that is, without re-arming transaction counter after every 256 cycles (16-bit mode)?
In this application there's no in endpoint, so no need for dataflow reversal...
- Dejan
Show LessHi,
I am newly started working on PSOC and USB CY7C63813-PXC. I want to make this USB device as HID device. For that by using some examples and documentation i started working on that. After programming that it is detected as HID device in device mange of the PC. In the code after enumeration i given data into the LoadEP function. When tried to read data from the device it is giving only 0s. Even input report ID also it is giving as 0. So i am not getting how to solve this problem.I am attaching project here. Please any one provide required information to solve this problem. Its an urgent requirement for us.
Show LessI need some GPIO in my design.
I'm beginning my first project using the encore-II USB Low-Speed CY7C63813, and I need help getting started. I'm using PSoC Designer 5.1 (Beta2).
I am designing a small HID keyboard peripheral (it actually only needs to send just a handful of key codes). I've wired the chip up to the USB connector and loaded the most basic configuration I could think of, and I can't seem to get the device to register as HID when I plug it in to my computer. I've searched all of the Cypress Design Support resources, as well as the internet, and I can't find a single example project that includes source code. I couldn't even find a Technical Reference Manual for this part.
I don't really need any help debugging my design -- I'm sure I could figure out the details. I just need a starting point that plugs in and registers with Windows correctly. A keyboard seems to be the simplest, most common application to use as an example. Can anyone point me to a basic keyboard example project for this family of chips?
Show LessHello,
I need some help in order to setup an alternate setting inside my usb device descriptor in order to pass all test required by the Windows Logo Kit and finally to certify my device and driver.
At the moment I'm performing some preliminary test using the USB Command Verifier (USB20CV) version R1.4.2.5 from www.usb.org but the descriptor test fails with the following error:
*******
Interface Number : 0, Alternate Setting : 0, Endpoint Number : 2, MaxPacketSize : 40
Alternate setting 0 has non zero MaxPacketSize Isoch endpoint
Bandwidth check failed
(1.2.40) An Isochronous endpoint present in alternate interface 0x00 must
have a MaxPacketSize of 0x00
*******
So I tried to create two alternate setting (0 and 1), the first one "alternate setting 0" with a packet size for the Isoch endpoint equal to zero but without success.
I also tried to create the "alternate setting 0" without the Isoch endpoint but also in this case without success.
Every time I try to specify an alternate setting inside the descr.a51 file the device fails and boot with the VID=0x0000 and PID=0x0000.
Can someone please explain me how to setup an alternate setting inside the descriptor and how eventually to pass the USB Command Verifier test ?
Thanks
Emanuele
P.S. My original descr.a51 file is attched to the message.
Show Less