Can you please let me know which Cypress Device you are using?
Refer to this KBA FX2LP: Dual Virtual COM Port Descriptors - KBA229819 where FX2LP descriptors is configured to enumerate as a dual COM port device.
Please note that KBA only makes the device enumerate as multiple devices each with a COM port, only the descriptor file is modified in this KBA, the functionality needs to be implemented in the firmware.
Sorry I previously misspelled your name.
BTW, that previous app note/example (KBA229819<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fcommunity.cypress.com%2fdocs%2fDOC-19267&c=E,1,uazAHdjD_cozMnKZUWOrV12csPN_Q7AJAybUid2i_IVzraP_Dzni5owUzpRtkG1imUeeakyeBPM1buVHrAoiJPmE7eL88KzbfqtyytExrKyrxdBI&typo=1>) does not seem to apply.
Please reply with more info
Peavey Commercial Audio - A Division of Peavey Electronics Corporation
+1 720 378 8941
Since you are using a PSoC5 the best example to start from would be:
CE95395 - USB MIDI with PSoC 3/5LP
This example project demonstrates the MIDI interface device operation.
The project enumerates as a USB Audio Device with the MIDI feature and does not require additional drivers.
The main goal of the USB MIDI interface is to transfer and convert MIDI data between external MIDI devices that use the UART interface, and a PC through the USB bus.
This does control two MIDI Devices – one USB -
You will need to retarget from a PSOC3 device to a PSOC5LP device.
If you need to have multiple USB MIDI channel interfaces on one USB CABLE – that would be a Composite device.
To add that you will need to edit the USB component and add new Endpoint and descriptors.
Since it already has one USB MIDI configured it is pretty easy to copy and add additional endpoint and descriptors for in and out functions.
Give it a shoot and if you have trouble and need help , let me know and if I have time I can modify project for you.
I'm using a PSOC 5. But even if I change the example in the link you provided to target my device, it instantiates two MIDI interfaces as external UARTs either way. I need them as embedded MIDI ports with one USB physical port. A composite. i.e. MIDI 1 and MIDI 2, each with its own identifier as defined in the alternate settings identifier string, and endpoints, too I would think. Not as external UARTs if I understand this correctly. So far no joy... If I add two interfaces under the config descriptor it compiles OK But does not work. But Win 10 that I connect to cannot start the second I/F. It sees it but gets a driver error 10. The first I/F can be selected from my win app but also does not work. Using an association descriptor to associate the 4 components of two MIDI IF's does not work at all either.
This does not nor does using a n association descriptor. Any ideas?
A good example of making a USB Composite device in a PSOC5LP:
Knowledge base article -
Implementing USB Composite Device with PSoC 3, PSoC 4L, or PSoC 5LP - KBA223141
Notice how they match , but with different names -
This is for a communication device class (CDC) device , but would be similar for the MIDI interface.
Can you double check those links? The clickable link given is the thread we are in now and KBA223141 does not appear to be : Implementing USB Composite Device with PSoC 3, PSoC 4L, or PSoC 5LP
YatheeshK_36.... are you still there?
I'm still flailing on this. I'd love your input, too since I gave you the part number you requested.
Please find Attached a Baseic Project for a USB Composie with 2 MIDI interface -
I used a Cypress DVK board - CY8CKIT-059
There still is an issue with the second interface , but the first one works and looks good.
I believe issue is with Interface Association Descriptor (IAD) .
DOC' from Microsoft -
Hopefuly this is a good starting point for you .. and maybe someone from the Community or Cypress Apps can help you figure out why the second interace is not showing up in Windows 10.
Hope that helps,
Here is a link to the project that MiDa_1966691 created and wanted to share above. He's a very knowledgeable, helpful guy with a lot of Cypress experience. Thanks for creating this, Mike.
This project does not fix the problem but provides a stripped down version of what I am trying to do that is very easy to work with. Both MIDI devices need to enumerate and be useful. So far that has not proven possible. What is the trick? Endpoint numbers? Endpoint indices? Association descriptors? Who knows this stuff? Cypress, where are you? All of the obvious things have been tried (I think).
All is well now. The descriptor needs to look like this:
Be sure the endpoints are different when defined i.e., EP1, EP2, EP3, EP4
AND... in USBxx_descr.c (usually named USBFS_descr.c but the user can change that. I did, mins is just USB)
In USBxx_descr.c the descriptor(s) are defined as data.
- Make sure yur descriptor is OK as above
- Turn ON the 'generate source' option in build options (skip=false)
- compile the project
- Turn OFF the 'generate source' option in build options (skip=true)
- open USB_descr.c
- there will be two instances (one for each control interface) of baInerfaceNr both with a value of 0x01 This is incorrect. Change the second instance to 0x03 for the 2nd interface
- recompile. Remember, generate source is off, we don't want to overwrite that change just made.
The two MIDI interfaces will now enumerate properly in the USB attached host as a composite device with two interfaces
After that you will have to adjust the supplied MIDI service and initialization routines to work with two sets of endpoints and local buffers.
The supplied code uses GLOBAL VARIABLES (USB_midi_out_ep and USB_midi_in_ep) to define single fixed set of endpoints.... boo...hiss....
Routines to look at re endpoint support (arguments not shown):