cancel
Showing results for 
Search instead for 
Did you mean: 

How to connect STM32F411CEU6 to FT232RL USB to TTL

WRama.1
Associate II

Hi, I'm trying to connect my STM32F411CEU6 to my laptop by using USB to TTL. The USB to TTL I use is FTDI FT232RL module, and I connect my STM to my FT232RL like these following (FT232RL -> STM32):

VCC -> 5V

GND -> GND

TX -> PB7

RX -> PB6

0693W00000NqOs8QAF.png0693W00000NqOsDQAV.pngThen, I connect my FT232RL to my laptop and then open Arduino IDE. In the Arduino IDE, I open up the serial monitor but it doesn't print anything.

But, when I connect my STM32 directly to my laptop without using FT232RL, my program works fine and I can see the serial monitor printing. So I'm sure the problem isn't located at my program, I suspect the problem is located at the connection between the STM32 and the FT232RL.

Can somebody please help me with this problem?

Thank you very much

-Wildan

6 REPLIES 6
KnarfB
Principal III

UART1 pins PB6 and PB7 may not be initialized by your software.

hth

KnarfB

What do you mean by "not be initialized by your software"? Do I have to put additional line of code in my program to set the TX RX pin?

I'm not using Arduino IDE like most people here. Check https://github.com/stm32duino/wiki/wiki/API#hardwareserial

hth

KnarfB

gbm
Lead III

And how exactly could we help you without seeing a single line of code?

What I really don't understand, however, is this:

"But, when I connect my STM32 directly to my laptop without using FT232RL, my program works fine and I can see the serial monitor printing. So I'm sure the problem isn't located at my program, I suspect the problem is located at the connection between the STM32 and the FT232RL."

How do you connect the UART of your STM32 to the PC without any interface?

My STM32 stuff on github - compact USB device stack and more: https://github.com/gbm-ii/gbmUSBdevice

Actually my program is just a hello world-printing program (I use Arduino IDE),

void setup() {

 // put your setup code here, to run once:

 Serial.begin(1000000);

}

void loop() {

 // put your main code here, to run repeatedly:

 Serial.print("Hello World!");

 delay(1000);

}

And I connect STM32 to my pc via UART by using FT232RL. As you can see from the connection I have stated before, I connect the TX pin from FT232RL to RX pin from the STM, and vice versa for the RX pin.

So the connection sequence from my PC:

PC -> FT232RL -> STM32

gbm
Lead III

Could you explain what you mean by:

"But, when I connect my STM32 directly to my laptop without using FT232RL, my program works fine and I can see the serial monitor printing."

?

Ok, my wild guess: you are using USB VCOM provided by STM32 Arduino core for console connection and you are surprised that the STM32 firmware you wrote sends the messages via USB and not via the UART serial port.

My STM32 stuff on github - compact USB device stack and more: https://github.com/gbm-ii/gbmUSBdevice