cancel
Showing results for 
Search instead for 
Did you mean: 

How to transmit from PC to STM32 to UART without USB to UART converter?

arduo
Senior

How can i transmit data through usb fs without ftdi usb to uart converter?

6 REPLIES 6

Be a CDC/VCP Device? See USB Device/Host Examples in HAL trees

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

i use the cdc standalone i can send data to usart tx and measure the right output but how can i manage the same functions with my mcu like the ftdi pl2303A

Piranha
Chief II

Clive already said it - program STM32 to be a USB CDC/VCP device.

i programed it but the same thing which works for me with pl2303 ftdi( usb to uart port) is not working with my mcu via usart3

FTDI does not make Prolific parts.

Dont understand what "same function" is in this context. It is not going to act like a USART peripheral. You're going to want to manage the data into a buffer, and have routines to process and consume it from the buffer. Ie check a FIFO / ring buffer, not spin for RXNE ​

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
static int8_t CDC_Itf_Receive(uint8_t* Buf, uint32_t *Len)
{
 
	HAL_UART_Transmit_DMA(&UartHandle, Buf, *Len);
	//HAL_UART_Receive_DMA(&UartHandle,x Buf, *Len);
	CDC_Transmit_FS(Buf, *Len);
 
  return (USBD_OK);
}