2013-08-28 10:17 AM
Does the STM32_USB-FS-Device_Lib_V4.0.0 Composite example actually work?
This code inusb_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 #usb2016-02-16 09:59 PM
I too am trying to run this example, but this example don't work. Please help.