cancel
Showing results for 
Search instead for 
Did you mean: 

USB CDC and USART recommended practice

whitehorsesoft
Associate III

When using USB CDC to communicate via USART, and interacting with USART data, in code is it recommended to interact with it at the USB side, or to interact with it at the USART side?

From what I can tell, both offer both polling and interrupt methods. The USART offers DMA access, but apart from that it's not clear what, if any, tradeoffs there are between USB CDC and USART.

1 REPLY 1
FBL
ST Employee

Hi @whitehorsesoft 

For applications requiring higher data rates and USB connectivity, USB CDC is more convenient because USB CDC provides dedicated functions for managing data transfer efficiently: CDC_Receive CDC_Transmit to handle received/transmitted packets from the USB host using interrupt callbacks.

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.




Best regards,
FBL