cancel
Showing results for 
Search instead for 
Did you mean: 

USB and USART1+Flow control simultaneous usage on stm32f107

jack_wang
Associate

Translated content.

我在cubemx中同时使能usart1和usb发现有个警告

I enabled usart1 and usb in cubemx and found a warning

jack_wang_0-1751529668961.png

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

jack_wang_1-1751529715893.png

 

为什么同时使用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?

1 ACCEPTED SOLUTION

Accepted Solutions

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:

mALLEm_0-1751535079620.png

Doing the exercise, unfortunately there is no available CTS/RTS pins for USART1:

mALLEm_1-1751535178104.png

The only available pins are used by the USB.

For the USB question please open a new thread. This one will be closed.

 

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

View solution in original post

9 REPLIES 9
mƎALLEm
ST Employee

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.

 

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.
jack_wang
Associate

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

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?

 

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

i mean the my true devices has no pin to output my debug info,so i need to enable usb to debug.

 

 

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.

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

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:

mALLEm_0-1751535079620.png

Doing the exercise, unfortunately there is no available CTS/RTS pins for USART1:

mALLEm_1-1751535178104.png

The only available pins are used by the USB.

For the USB question please open a new thread. This one will be closed.

 

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

jack_wang_0-1751535980103.png

 

@jack_wang 

Please continue your discussion here: USB CDC not working with USART1 

Your question was about the hardware control conflicts. 

mALLEm_0-1751536112564.png

It's not recommended to handle more than one question in the same thread.

Thank you for your understanding.

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

okay, please help review this problem usb virtual serial and usart1 can not work at the same time