Skip to main content
SBort.1
Associate II
July 20, 2022
Question

not receiving data from HOST to Device in the Custom HID implementation

Good morning all right guys. I'm currently implementing USB communication on the STM32F072R8T6 microcontroller with "Custom HID" class. I'm having problems receiving data from the Host (PC) in the function below. The following happens: I can receive up to 2 data packets from the Host and then I can no longer receive and process them. In the communication on the other side, sending from "Device" to "Host" I'm not having problems, but only to receive them (Host to Device). I followed the recommendation of this link for such an implementation https://www.youtube.com/watch?v=3JGRt3BFYrM&t=257s I didn't use HID Terminal, in fact I didn't find anything on the Internet but a professional Host application. Thanks

 

static int8_t CUSTOM_HID_OutEvent_FS(uint8_t* state)

{

  /* USER CODE BEGIN 6 */

 __disable_irq();

 memcpy(BufferUSB_RX,state,64);

  memset(state, '\0',64);

strlen(Buffer_TX));

  __enable_irq();

 return (USBD_OK);

  /* USER CODE END 6 */

}

This topic has been closed for replies.

2 replies

SBort.1
SBort.1Author
Associate II
August 3, 2022

Thanks for help.

Ahmad M.Nejad
Associate II
September 12, 2022

I have exactly the same problem.

But ST leaves us alone!