- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In the slavefifosync example code, 2 endpoints are initialized.The device is enumerated as this:
I want to know how to add another endpoint to the tree. Can anybody provide some examples about endpoint operation or just give me an example with 3 or 4 endpoints.So I can compare the initialization code and the discriptor between them.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
You can add up to 32 endpoints in the descriptor file (cyfxslfifousbdscr.c). When new endpoints are added to the dscr.c file the total length field in the configuration descriptor must be changed accordingly. Also the number of interfaces in the interface descriptors must be changed.
Please refer to the attached project in which 2 more end points are added in the descriptor file(cyfxslfifousbdscr.c) and the endpoints are configured in the cyfxslfifosync.c file under CyFxSlFifoApplnStart() function.
The super speed configuration descriptors total length is modified to 0x46,0x00 (which includes the 2 new endpoint descriptors' lengths) and also the number of endpoints field in the interface descriptor is changed to 4.
Please refer to this https://www.beyondlogic.org/usbnutshell/usb5.shtml#EndpointDescriptors for more details on endpoint and other USB descriptors.
Best Regards,
Yatheesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
You can add up to 32 endpoints in the descriptor file (cyfxslfifousbdscr.c). When new endpoints are added to the dscr.c file the total length field in the configuration descriptor must be changed accordingly. Also the number of interfaces in the interface descriptors must be changed.
Please refer to the attached project in which 2 more end points are added in the descriptor file(cyfxslfifousbdscr.c) and the endpoints are configured in the cyfxslfifosync.c file under CyFxSlFifoApplnStart() function.
The super speed configuration descriptors total length is modified to 0x46,0x00 (which includes the 2 new endpoint descriptors' lengths) and also the number of endpoints field in the interface descriptor is changed to 4.
Please refer to this https://www.beyondlogic.org/usbnutshell/usb5.shtml#EndpointDescriptors for more details on endpoint and other USB descriptors.
Best Regards,
Yatheesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I have already know how to modify the descriptor and code in CyFxSlFifoApplnStart() to add endpoints now.
But it seems that I didn't create the DMA channel correctly, in the code attatched, the ep 0x01 and 0x81 can transfer data correctly, but the new channel ep 0x82 can not work.
Please help me check what's wrong in the code.
Thank you,
Best Regards
Liu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I can transfer data via the new channel now,turns out that I posted a wrong P socket address in the test earlier.
I gave address of 0x10 earlier, transfer failed, then I tried 0x01,transfer successed.
I am a little confused now. I enabled PIB socket like this:
I thought the address for CY_U3P_PIB_SOCKET_2 should be 0x10 ,which was wrong, the right address is 0x01.
why is that?
Best regards,
Liu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
The Thread addressing is A1:A0 format i.e for addressing thread 2, A1 should be 1 and A0 should be 0. Please make sure this condition is met.
Thanks,
Yatheesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I think I have followed procedures as you specified.
I give socket address 0x00 in FPGA, monitor flaga,and bulk data in from ep81, the transmission is correct.
Then I give socket address 0x01,monitor flagc, bulk data in from ep82, the transmission is correct.
All other configuration can not achieve data transmission.
The firmware is exactly the one attached in last letter.Here are some information about the FPGA configuration . Please help me find the problem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Can you please probe the address lines from the FX3 and check externally if the A1 = high and A0 = low, when thread 2 is supposed to be selected/addressed.
Thanks,
Yatheesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
It's a little difficult to probe the address lines, One of them is layout in inner plane, and none of them has a test point.
I will try and let you know if I succeed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
The thread addressing is in A1:A0 format. So, when addressing thread 2. A1 = 1 and A0 = 0. Please check the mapping and values and confirm the same.
Thanks,
Yatheesh