AnsweredAssumed Answered

STM32Cube/HAL USB CDC - TX Complete Callback?

Question asked by MWP on Dec 14, 2016
Latest reply on Feb 2, 2017 by McDonnell.Brenda.001

Hi all,

 

Does anyone know of the "correct" way to get a call back when the previous transfer has been completed?

The USB CDC has the TxState status variable which is cleared when a transmission is complete, but i don't really want to poll this.

TxState is cleared in USBD_CDC_DataIn() which is in usbd_cdc.c (Middlewares/USB), so i also dont want to modify this file to add a callback as any changes will be cleared when STM32Cube re-gen's the code.

 

Im really looking forward to the new LL drivers are properly supported by STM32CubeMX.

HAL is terrible

 

Thanks in advance.

Outcomes