2019-01-15 04: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.
2019-01-15 05:48 AM
Probably use a buffer/fifo and NOT use blocking functions?
2019-01-15 05:48 AM
Probably use a buffer/fifo and NOT use blocking functions?
2019-01-15 06:21 AM
Review the examples in Cube, e.g. [CubeF4]\Projects\STM324xG_EVAL\Applications\USB_Device\CDC_Standalone\
JW
2019-01-15 06:42 AM
where can i find them ?
2019-01-15 08: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.
2019-01-15 11:49 PM
There is no example for my issue for VCP forwarding data to uart
2019-01-16 05: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?
2019-01-16 08:03 AM
What's wrong with the example I pointed out above?
JW