2019-08-19 08:48 PM
Hi ,
I'm using STM32F4x9 eval board with STM32Cube v1.24 library on USB device parctice.
Refer to CDC example, a new SCAN device class was created and enumerated succcess.
Sending data from PC host site (Bulk Out) can success to get in device (STM32 - via USBD_LL_PrepareReceive() ).
But I have problem on responding data from device to host (bulk-in, STM32->PC).
I just put the some characters via USBD_LL_Transmit(), and suppose the IN ep number and data buffer is okay.
However I cannot get any data on host site, the USB protocal analyzer get not thing input (pc site read timeout).
Any suggestion of this situation? Is that some setting problem I should revise or some guides then I can look into. thanks.
Regards,
Paul
2019-08-23 03:48 AM
hi all,
i've find out the problem.
it's the setting issue in USBD_LL_Init().
the txfifo setting should relate to endpoint number. (HAL_PCDEx_SetTxFiFo(*hpcd, fifo_num, size))
if set to the wrong fifi no, the bulk-in write packet cannot be sent due to txfifo check in PCD_WriteEmptyTxFifo().
fyi.