The CDCs should be active at the same time, you need to init the enpoints for both in that code then do sduConfigureHookI() for both.
you mean someting like
Code: Select all
/* Enables the endpoints specified into the configuration.
Note, this callback is invoked from an ISR so I-Class functions
must be used.*/
usbInitEndpointI(usbp, SER1_USBD1_DATA_REQUEST_EP, &ep1config);
usbInitEndpointI(usbp, SER1_USBD1_INTERRUPT_REQUEST_EP, &ep2config);
/* Resetting the state of the CDC subsystem.*/
sduConfigureHookI(&SDU1);
usbInitEndpointI(usbp, SER2_USBD1_DATA_REQUEST_EP, &ep3config);
usbInitEndpointI(usbp, SER2_USBD1_INTERRUPT_REQUEST_EP, &ep4config);
/* Resetting the state of the CDC subsystem.*/
sduConfigureHookI(&SDU2);
Post the descriptors, I could give it a try later.
I put the descriptor in the file usbconfig1.c in this project https://drive.google.com/file/d/0B3a7E0ODHTNHYUp4WS1LNk5vbEU/view?usp=sharing which a clone of a discovery demo with just dual cdc tryies.
When i plug the usb, i see the two CDC devices, but trying to access them make the stm to busfault.
For the descriptor, i use the one that has been posted at the begining of this thread, ... more than one year ago, and it's kind of copy and paste
of stmicro demo without using the convenient macro provided by chibios usb.h to construct headers.
I understand that you have more urgent and interesting things to do than debug my code, but if you can continue to give me tips,
i will perhaps be able to complete this dual cdc example ...
Anyway, thanks for your help.
Alexandre