cancel
Showing results for 
Search instead for 
Did you mean: 

Does USB-FS-Device_Lib_V4 Composite example work?

Bill Lewis
Associate III
Posted on August 28, 2013 at 19:17

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

#usb

1 REPLY 1
alfinikov
Associate III
Posted on February 17, 2016 at 06:59

I too am trying to run this example, but this example don't work. Please help.