2025-07-03 1:03 AM - last edited on 2025-07-03 2:44 AM by mƎALLEm
Translated content.
我在cubemx中同时使能usart1和usb发现有个警告
I enabled usart1 and usb in cubemx and found a warning
usart1的流控被usb的dp和dm复用,但是实际上我是没有开流控的
The flow control of usart1 is multiplexed by dp and dm of usb, but I actually didn't turn on the flow control
为什么同时使用usb虚拟串口和usart1收发数据的时候,发现只要usart1一发送数据,两个串口都没有输出了??
这是为什么呢
Why when using the USB virtual serial port and usart1 to send and receive data at the same time, I find that as soon as usart1 sends data, both serial ports have no output? ?
Why is this?
Solved! Go to Solution.
2025-07-03 2:34 AM - edited 2025-07-03 2:36 AM
Hello,
I didn't understand. Your first question is talking about the usage of USB+USART1/HW flow control
So now your question is about: "USB is not working" and this is another question that you need to open another thread for it. I watched the video you shared and it's linked to the USB usage that other experts can help you on the subject.
Now regarding your original question, as I said it's a conflict with USB pins:
Doing the exercise, unfortunately there is no available CTS/RTS pins for USART1:
The only available pins are used by the USB.
For the USB question please open a new thread. This one will be closed.
2025-07-03 2:01 AM
Hello @jack_wang and welcome to the ST community,
First, in next time, please use English language so others can understand your question.
Second, mostly because there is a conflict in the pin usage especially with CTS/RTS pins that are used with USB pins. You need to pass you mouse cursor over "USART1" and you will get the warning that provides you the information about the conflict.
You can still use UART1 without HW control with USB or find another GPIOs containing these alternate functions of CTS/RTS.
2025-07-03 2:08 AM
1)I need use usb to output debug info, and use usart1 to communicate to other device.And other pin cannot be used, so i need use usb and usart1 at the same time
2)usb have not data output, usart1 normal
2025-07-03 2:16 AM
Not sure what do you mean by: "other pin cannot be used", do you mean the other gpios containing CTS/RTS are reserved for other usage?
Could you please share your ioc file?
2025-07-03 2:24 AM
2025-07-03 2:32 AM
It would help a lot if you provided the schematics of your board - far clearer that trying to describe in words!
Please See: How to write your question to maximize your chances to find a solution.
2025-07-03 2:34 AM - edited 2025-07-03 2:36 AM
Hello,
I didn't understand. Your first question is talking about the usage of USB+USART1/HW flow control
So now your question is about: "USB is not working" and this is another question that you need to open another thread for it. I watched the video you shared and it's linked to the USB usage that other experts can help you on the subject.
Now regarding your original question, as I said it's a conflict with USB pins:
Doing the exercise, unfortunately there is no available CTS/RTS pins for USART1:
The only available pins are used by the USB.
For the USB question please open a new thread. This one will be closed.
2025-07-03 2:46 AM - last edited on 2025-07-03 3:13 AM by Andrew Neil
2025-07-03 2:49 AM - edited 2025-07-03 2:49 AM
Please continue your discussion here: USB CDC not working with USART1
Your question was about the hardware control conflicts.
It's not recommended to handle more than one question in the same thread.
Thank you for your understanding.
2025-07-03 2:54 AM
okay, please help review this problem usb virtual serial and usart1 can not work at the same time