Forum Discussion
USB Device Controller ISP1362
Hi,
I'd like to ask if anyone knows how to transfer more than 64 kBytes between the Device Controller (in chip ISP1362 placed on my DE2_Board) and the Host controller (my computer). I'm not able to write more then 64 kbytes into the buffer of the OUT endpoint. I access the register of the endpoints in PIO mode. Maybe I have to change the configurations of the 2 endpoints I use, for example to ISOCHRONOUS one (that i don't really know what it is)? I hope I have been clear enough, if anyone would give me even a little suggestion it would be a great help for me! thank you, Paola21 Replies
- Altera_Forum
Honored Contributor
You surely didn't mean 64 kB. Actually the maximum packet size for bulk transfer is 64 byte by USB specification. This isn't a speed limitation, cause multiple packets may be transferred during an USB basic time interval of 1 ms, up to the maximum full speed USB capacity. I'm not particular familiar with ISP1362, but as far as I understand the manual and embedded programming guide, you can place multiple packets into a buffer in advance, as usual with other USB controllers. Bulk transfer is the recommended and most effective method for regular data transfer and e. g. used with mass storage device class (MSC). Isochrone transfer is, as the name suggests, for data that must be delivered continously in time, e. g. audio streams.
- Altera_Forum
Honored Contributor
Hi,
thank you for your answer! yes you're right, it's 64 bytes not 64 kBytes and the better mode of transfer is the Bulk transfer. I found that the Device Controller of the ISP1362 is a core based on Philips ISP1181 Device Controller and the ISP1181 has 2-bit address bus. So I realized when I try to write to the endpoint an array with 4 elements (1 element=2 bytes) it's all ok, instead when I try to write to the endpoint an array with more than 4 elements I can read from the USB host (my PC) only the first 4 elements, the left ones are all zero... so that my solution is to implement a FOR loop that write to the endpoint 4 elements per time, but I think there will be a better solution, even if I haven't still any idea about it. Paola - Altera_Forum
Honored Contributor
Hi,
I'm using the code from DE2_NIOS_DEVICE_LED demonstration and I'm not able to send more than 8 bytes... Here is what I changed In void config_endpoint(void) of MAINLOOP.C: /*port2 is IN*/ Hal4D13_SetEndpointConfig( D13REG_EPCNFG_FIFO_EN| //D13REG_EPCNFG_DBLBUF_EN| D13REG_EPCNFG_IN_EN| D13REG_EPCNFG_NONISOSZ_16, <------- All I want is 16 bytes EPINDEX4EP02 ); Now in my main loop: static unsigned char bbuf[16]; ... Hal4D13_WriteEndpoint(EPINDEX4EP02,&bbuf, 16); And in my program in C#: [DllImport("EasyD12.dll")] private static extern byte ReadPort2(byte[] pData, int iLen); ReadPort2(buff, 16); My fisrt 8 bytes are correct but the 8 others are like copy of the 8 first.. Please help! - Altera_Forum
Honored Contributor
Hi!
I have the same problem... I believe the problem is the address bus: it is only 2 bit large, so I cannot write more then 8 byte per time... when i try to write more then 8 bytes, the left bytes are all zeros! bye paola - Altera_Forum
Honored Contributor
Humm..
I don't know why you tell that... 8 bytes = 64 bits --- Quote Start --- it is only 2 bit large, so I cannot write more then 8 byte per time... --- Quote End --- it's 64 bits not 2 ... - Altera_Forum
Honored Contributor
for example:
if i want to write an array of short, i'll be able to write to the endpoint buffer only the first 4 elements of the array, because with an adrress of 2 bit i can only deal with 4 addrresses... is it correct? that's a problem, because the speed is so low for a USB! bye bye paola - Altera_Forum
Honored Contributor
Ok I understand!
Because my program must work tonight :) I'm sending different message to send all my data - Altera_Forum
Honored Contributor
hello all,
I have DE2-70 board and I need to work with USB device.I am now working with a domo project "E2_70_NIOS_DEVICE_LED"on DE2-70 board.I download *.sof file and then in NIOS II IDE I build and run it.I think it should ask for driver for ISP1362 but it donot. I think my system should recognize USB-device as it recognize USB-Blaster.but it is not. I am lost and desperate.I have put my one week on it and no results. Pleaes guide me how you people working with it. give me simple tips and ideas initially to start working with ISP1362.I am not expert in c but I have much work with VHDL and FPGAs. Farhat - Altera_Forum
Honored Contributor
Yes, I also want to have some guides to work with the ISP1362...
Now I can read from the ISP1362 the packet from the host PC but I cannot send anything to the host PC (PC side receive no packet) - Altera_Forum
Honored Contributor
Hello friends,
I am currently using DE2 70 board. I was trying to use the DE2 board's device property( DE2 boarda as a USB device). I started with the DE2_LED demonstration.unfortunately I am not able to install the USB driver for ISP1362 USB controller driver. I am using Win Xp Operating Sytem. It does not detect my De2 Board and it never ask for the driver as said in the READ me text in the DE2_LED demonstration. I also facing another interesting situation. Now I am not able to down load any .sof files to my DE2 70 board. It shows an error, JTAG server cant find the device. Can any one help me in this reagrd???Thanking you in advance.. Mahesh