2014-09-02 12:53 PM
Hi,
I'm working with the STM32F40G EVAL board, and used the STCube to generate USB CDC middleware and it works fine. I am interested in modifying the STCube generated firmware, and having the device enumerate as multiple (2 or 3) CDC devices. Has anyone done this for the STM32F4 series? I have found a project for the STM32F1's on the forums but the base firmware used in that is considerably different. I'd appreciate it even if someone can give me directions, regarding the modifications needed. Thanks, Umaid2014-09-03 02:36 AM
Hi Umaid,
It's worth noting that CDC requires 2 IN and 1 OUT endpoints, so the working with multiple CDC devices depends really on the USB instance you are using (FS or HS).Within the OTG_FS we have 3 IN / 3 OUT endpoints, so you can only have one CDC. Otherwise, within the OTG_HS we have 5 IN / 5 OUT endpoints, so you can have two CDCs.Hope that can help you.With regards.2014-09-03 02:56 AM
FS: control endpoint + 3 bidirectional endpoints (4 in and 4 out)
HS: control endpoint + 5 bidirectional endpoints (6 in and 6 out) FS: 1 CDC HS: 2 CDC If you are not interested on a USB certification, you can have FS: 2 CDC HS: 4 CDC The windows driver do not actually use the interrupt endpoint, it just polls the device. You can use the same interrupt endpoint for all the CDC devices. However, shared interrupt endpoint is not described on the official CDC documents, I think that you will not be able to get your device USB certified if you share the same endpoint. I have tried to create a multiple CDC project with shared interrupt endpoint. Using the HS port of an stm32f405 , the board is recognized on the device manager as a composite device with three COM ports. The first COM port works fine, I have to find out how to send and receive data from the other two ports. I got some inspiration from this post2014-09-03 08:15 AM
Hi,
For this project, I'm using HS USB in device mode only, so I'm aiming for 2 independent CDC instances with the available endpoints. (I want to be in the USB spec so no endpoint sharing). Dimopoulos, thats an interesting post, but I'm using firmware generated from the STCube so the stack is different (same end application though). I was wondering if there are any guidelines for this type of a modification.. Thanks! -Umaid