AnsweredAssumed Answered

Does USB-FS-Device_Lib_V4 Composite example work?

Question asked by lewis.william on Aug 28, 2013
Latest reply on Feb 17, 2016 by finikov.alexander
Does the STM32_USB-FS-Device_Lib_V4.0.0 Composite example actually work?

This code in usb_prop.c to set up Endpoint 2 IN (used by the Mass Storage Device) seems screwy to me.  ENDP1 gets used where I would expect ENDP2. Or am I totally not understanding how it's supposed to work?

/* Initialize Endpoint 1 */
SetEPType(ENDP1, EP_INTERRUPT);
SetEPTxAddr(ENDP1, ENDP1_TXADDR);
SetEPRxAddr(ENDP1, ENDP1_RXADDR);
SetEPTxCount(ENDP1, 2);
SetEPRxCount(ENDP1, 2);
SetEPRxStatus(ENDP1, EP_RX_VALID);
SetEPTxStatus(ENDP1, EP_TX_NAK);
/* Initialize Endpoint 2 IN */
SetEPType(ENDP2, EP_BULK);
SetEPTxCount(ENDP1, 64);
SetEPTxAddr(ENDP2, ENDP1_TXADDR);
SetEPTxStatus(ENDP2, EP_TX_NAK);
/* Initialize Endpoint 2 OUT */
SetEPType(ENDP2, EP_BULK);
SetEPRxAddr(ENDP2, ENDP2_RXADDR);
SetEPRxCount(ENDP2, 64);
SetEPRxStatus(ENDP2, EP_RX_VALID);

I'm interested in this example as basis for making a composite MSD+CDC on a STM32F103RCT6 chip.
-Bill

Outcomes