2015-10-14 07:41 AM
Hello,
I have to receive some data in a ''set_feature'' command. It's possible because the packet is:Offset Field Size Value Description
0 bmRequestType 1 Bit-Map
D7 Data Phase Transfer Direction
0 = Host to Device 1 = Device to Host D6..5 Type 0 = Standard 1 = Class 2 = Vendor 3 = Reserved D4..0 Recipient 0 = Device 1 = Interface 2 = Endpoint 3 = Other 4..31 = Reserved1 bRequest 1 Value
Request
2 wValue 2 Value
Value
4 wIndex 2 Index or Offset
Index
6 wLength 2 Count
Number of bytes to transfer if there is a data phase
I can't find were is the code to read this data but if I respond to the command I can see in the sniffer the data!! Somewhere the code writes the buffer with the data. thanks! #stm32cubemx-cdc-set_feature2015-10-15 04:27 AM
I solved it!
I add this code uint8_t *pdata; if(pdev->request.wLength>0) { USBD_CtlContinueRx (pdev, pdata, pdev->request.wLength); } In the function USBD_LL_SetupStage(USBD_HandleTypeDef *pdev, uint8_t *psetup) and I have the data