Forum Discussion
Altera_Forum
Honored Contributor
11 years agoHi,
--- Quote Start --- I'm trying to use the isp 1362(host mode) with nios2 to communicate with a FTDI 232H chip (bulk transfer mode supported only). Everything is fine, i can get the descriptor of the FTDI chip and i'm connected in full speed mode . --- Quote End --- Then this means you have made good progress.Nice. --- Quote Start --- --- Quote Start --- There is a PTD.c file provided by Terasic with multiple methods to handle all 4 usb transfert modes which are : -send_iso for isochronous -send_int for interrupt -send_control for control -send_ptl (what is that?) I just want to send a byte in bulk mode (ie 0xAA) What is the right way to do this? i would say i should make a ptd with "void make_ptd(int *rptr,char token,char ep,int max,char tog,char addr,char port)" But what should i put in the rptr[4], rptr[5], rptr[6] and rptr[7]? --- Quote End --- Sorry but I don't have idea about this. Particularly I don't have file which you are referring. Hence don't know what is the use of rptr. --- Quote Start --- Is there a special code to put next the ptd to do an OUT transfer like in Control transfer? --- Quote End --- No. But you should put Bulk OUT request after SET CONFIGURATION request. USB device responds to bulk out after its configuration is set by host using SET CONFIGURATION request. Have you performed this request? Do you have some reference available or are you trying to do this your own? Asking this to know whether you have just got device descriptor or have already enumerated device. --- Quote Start --- Or should i just put the data after the ptd? --- Quote End --- Payload offset starts immediately after PTD offset according to ISP1362 datasheet. Are you asking this? --- Quote Start --- Well i'm quite lost for now... --- Quote End --- Don't worry! Be happy. We will see if we can help you.