I’m developing an STM32-based USB device. It has to receive some data via bulk endpoint 2. So I’m calling HAL_PCD_EP_Receive function, giving it pointer to a buffer (audio_data), then sending the data from the host.
Then the DataOutStage callback is fired, it knows that it has received 16 bytes of data (it is not specified anywhere in the device code), but the data itself is not in the buffer I’ve provided – the buffer contains only zeros.
Here I’m attaching the sample of my code along with the log, and screenshot from wireshark, demonstrating that the request has been sent with 16 bytes of data.
Please suggest what I may be doing wrong.