2022-02-26 03:41 AM
HI,
I am using a stm32f401RE chip on my board, a single virtual com port is working fine, but if it is possible to run twice virtual COMS? and what are the processing steps?
Regards,
Naren
2022-02-26 04:45 AM
Creating a composite USB device is possible, but requires some work and is not supported by CubeMX directly. There are some examples out there:
https://github.com/GaryLee/stm32f103_dual_vcp
2022-02-26 08:05 AM
Thanks, TDK
I am tried as per the above link, two com ports are detected, but data is not sending
uint8_t *data = "****technologies \n";
while(1)
{
CDC_Transmit_FS(data, strlen(data));
HAL_Delay (1);
}
Regards,
naren
2022-02-26 10:52 AM
> CDC_Transmit_FS(data, strlen(data));
The code in the provided link requires 3 arguments for CDC_Transmit_FS and you are only providing 2. Are you sure you're using the code in the link?
Not saying it'll work out of the box, but should get you some of the way there. It will still require some experience on your part.
2022-03-10 07:47 AM
HI,
We acquired the data from both virtual com ports, We are trying to transmit the data to both ports, but the single port is only working?
CDC_Transmit_FS((uint8_t *)uart_ctx->buf.data[buf_idx], uart_ctx->buf.len[buf_idx], 2 * i)
//CDC_Transmit_FS("data",strlen("data"),1);
//HAL_Delay(100);
//CDC_Transmit_FS("data",strlen("data"),2);
//HAL_Delay(100);
Regards,
Naren