Forward Data from VCP to UART
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-01-15 4:55 AM
How can i forward data which i received at my COM Port via USB FS to a UART of my Choice?
I already send data to UART5 and i measured it with an osci and its working
har buffer[] = "TEST";
HAL_UART_Transmit(&huart5, buffer, sizeof(buffer), HAL_MAX_DELAY);
So How can i forward data from VCP received in a Terminal to any UART?
Solved! Go to Solution.
- Labels:
-
UART-USART
-
USB
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-01-15 5:48 AM
Probably use a buffer/fifo and NOT use blocking functions?
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-01-15 5:48 AM
Probably use a buffer/fifo and NOT use blocking functions?
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-01-15 6:21 AM
Review the examples in Cube, e.g. [CubeF4]\Projects\STM324xG_EVAL\Applications\USB_Device\CDC_Standalone\
JW
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-01-15 6:42 AM
where can i find them ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-01-15 8:49 AM
Start CubeMx and look in the Help | Updater settings. First item is Repository folder, so follow it and you'll find all MCUs installed with their HAL packages. Start looking there!
Btw. it contains so many examples I bookmarked it in my Explorer library.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-01-15 11:49 PM
There is no example for my issue for VCP forwarding data to uart
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-01-16 5:04 AM
char byte[2000];
for (;;)
{
if (VCP_read(&byte, 1) != 1)
continue;
HAL_UART_Transmit(&s_UARTHandle, byte, sizeof(byte), HAL_MAX_DELAY);
VCP_write("\r\nYou typed ", 12);
VCP_write(&byte, 1);
VCP_write("\r\n", 2);
}
i did this and it worked i get data out of the uart when i type something through the terminal how can i do it with buffer/fifo any tutorials or websites?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-01-16 8:03 AM
What's wrong with the example I pointed out above?
JW
