Forum Discussion
Altera_Forum
Honored Contributor
17 years agoDE2 board USB communication
Hello people,
I'm curious to know is there anyone who have experience with DE2 board USB communication ? There is some ISP1362 USB-OTG controller which must be appropriate configured in order to communicate with USB device plugged into DE2 USB connector. Does anybody worked with this controller using VHDL programming language ? Is there a lot of problem to configure ISP1362 USB-OTG controller ? Thank you very much, Bojan34 Replies
- Altera_Forum
Honored Contributor
hi,
i'm doing finnal year project now, the project title is: doing an USB communicatin in VHDL, it is same with your project, DE2board, ISP1362... I haven't learnt VHDL before, so i have no idea about it. Have you finish your project? I need you help...Thank you very much^^ - Altera_Forum
Honored Contributor
Hi all,
Now, i am building SOPC system to make communication between PC and USB in DE2 using USB chip controller philips ISP1362. I read in such tutorial (lower version of NIOS II 9.0) that I have to make interface to the NIOS II Processor by choosing "Interface to User Logic" in the subtree "Legacy Components". But I didn't find that interface in NIOS II 9.0 IDE. What is the name of that interface in the NIOS II 9.0 IDE? Thank you... - Altera_Forum
Honored Contributor
According to the function prototype
the correct syntax isUSHORT Hal4D13_ReadEndpoint(UCHAR bEPIndex, UCHAR * buf, USHORT len);
It has nothing to do with NIOS II, just a basic C syntax issue.Hal4D13_ReadEndpoint(EPINDEX4EP02,bbuf, 16); - Altera_Forum
Honored Contributor
Hi,
I’m modifying the firmware coding of device controller which found from DE2 CD. My target is to send 16 bytes data block per transmission. I had modify the coding from ISR.c and mainloop.c But I still fail to make it transfer 16 bytes data per packet. (this is the coding from interrupt service routine,ISR.c) void Isr_Ep02Done(void) { unsigned char bbuf[16]; int i = 0; Hal4D13_GetEndpointStatusWInteruptClear(EPINDEX4EP02); Hal4D13_ReadEndpoint(EPINDEX4EP02,&bbuf, 16); //error was found here : passing arg 2 of //'hal4d13_readendpoint' from incompatible pointer type. if( sendCount < length) { Hal4D13_WriteEndpoint(EPINDEX4EP02, data + sendCount, 16); Hal4D13_GetEndpointStatusWInteruptClear(EPINDEX4EP02); sendCount += 16; if(sendCount > length) { sendCount = 0; length = 0; for( i = 0; i < 65; i++) data[i] = 0; } } } Can anyone give me suggestion on how can I debug this error? I’m stuck…. Thanks, Summer - Altera_Forum
Honored Contributor
Thank you for the help,
I've found the problem: there is a space in my directory path. I have to rename my folder name so that there is no space anymore on my path directory. - Altera_Forum
Honored Contributor
what's the type of project that you created?
C/C++ ? - Altera_Forum
Honored Contributor
Hello...
Now, i am doing my project to transfer image between host computer (PC) and FPGA DE2 Altera via USB and display it into monitor. I am still new in using NIOS II Processor. First, I try to buil project USB Device given in Altera CD-ROM (DE2_NIOS_DEVICE_LED.sof in DE2_Demonstrations folder). But, i found error when building project like below: "The software setting (STF) file associated with this project is damaged. This may be fixed by copying your source files into new C/C++ application project. For more details see the error log." What should i do? What is the meaning of copying source file into new C/C++ application project? Thank you - Altera_Forum
Honored Contributor
--- Quote Start --- If I well understood, I must use Nios II processor with some kind of assembly programming to configure ISP1362 USB controller ? --- Quote End --- The easiest is to use C code. --- Quote Start --- Can I combine in one Quartus II project Nios II processor like a part of my design and VHDL programming for the rest of my desing? --- Quote End --- Yes, you can! - Altera_Forum
Honored Contributor
Actually, I need very very simple USB communication: I need to receive via USB just one byte of command for my design. My design then will do some actions and will respond via USB with a few bytes. I use VHDL for desing programming.
Which is the best way to realize this ? If I well understood, I must use Nios II processor with some kind of assembly programming to configure ISP1362 USB controller ? Can I combine in one Quartus II project Nios II processor like a part of my design and VHDL programming for the rest of my desing? Thank you for your time and effort, Regards, Bojan - Altera_Forum
Honored Contributor
--- Quote Start --- But there is no visible code for this examples, and USB controller is configured using Nios II processor. I want to use VHDL to configure controller. --- Quote End --- Implementing USB host mode without a processor is very difficult. USB was designed for a processor managing the host. I'm not sure you would find a hardware-only USB-host core. Such a core would probably need almost as much resources as a NIOS II processor, possibly even more.