cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F4x9 Eval USBD bulk in transmit problem

PChou.16
Associate

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

1 REPLY 1
PChou.16
Associate

​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.