Dear all,
I have some questions on C5509 USB programming
I am trying to connect the C5509A DSK to PC via the usb interface. I have reused the source code available at
http://c5000.spectrumdigital.com/evm5509a/files/usbexample/example_usb.html. I called it source code 1
This code appeared to be ok prompting expected numbers of bytes sent or received; however, when I checked the accuracy of data I found some errors , then I switched to another source code available at
http://e2e.ti.com/support/dsp/c5000/f/109/t/100068.aspx?pi68743=1. I called it source code 2
As I observed this is another(modified and improved) version of source code 1, it did communicate pretty well with the program on PC that repeatedly sends and receives data to/from C5509.
Question 1: When I change the manner of test - the program on PC only reads data from C5509, the PC gets crashed with a blue screen then restarts. I cant figure out why that test doesn't work, even when I use two separate buffers for the in and out processes
Question 2:
Taking further analysis, I dont know why we have
USB_postTransaction(hEpIn, Endpt2Buff[0], &Endpt2Buff, USB_IOFLAG_NOSHORT); for In action
and
USB_postTransaction(hEpOut, 64, &Endpt2Buff, USB_IOFLAG_NOSHORT); for out action
What are the roles of Endpt2Buff[0]? and how is Endpt2Buff[0] affected by in/out actions?
Question 3- As described in USB protocol, when USB device is not ready to send or receive a packet, it replies the host with a NAK packet - where is this implemented in CSL library?
Question 4: Is there any example of USB communication for C5509 using DSP/BIOS? I am using CCS 3.3
I would like to thank you all very much for reading and answering my questions.
Nguyen Anh Duc