One CDC function requires 2 IN / 1 OUT endpoints (interrupt IN/ bulk IN/ bulk OUT), other than the default EP.
Available endpoints of each STM32F family are,
STM32F102/103
- FS Device core: 7 IN / 7 OUT
STM32F105/107
- OTG_FS: 3 IN / 3 OUT
STM32F2xx/4xx
- OTG_FS: 3 IN / 3 OUT
- OTG_HS: 5 IN / 5 OUT
STM32F102/103 - 3x CDC composite
STM32F105/107 - just one CDC
STM32F2xx/4xx - 2x CDC composite on OTG_HS