STM32

Thread Starter

samyang

Joined Jul 24, 2022
43
I am having trouble getting the FT232RL IC working with the STM32. Currently the TX works, I am able to send a signal via USB from laptop to the FT232RL which goes to the STM32, as shown in the schematic the TX LED blinks. However, the STM32 is incapable of sending the information back to the FT232RL, so the RX LED does not blink. We have verified the TX on FT232RL to RX pin of the STM32 and visa versa. Our STM32 is running on 3.3V which is why VCCIO is tied to 3V3 out. We also verified all the soldering connections. Our issue is with PC12 as it always stays high. Does anyone have some insight in how I can debug this?
 

Attachments

Thread Starter

samyang

Joined Jul 24, 2022
43
We tried using platformIO and STM32Cube. The code from the cube IDE is auto-generated.
Below are screenshots of the code on platformIO.
Starting with the simple issue first, Here is code to try to configure PC12 and PD2 as output pins to see if they are able to go both high and low. When flashing this code and measuring the voltage from the vias, PD2 goes low (to 1 volt) while PC12 remains at 3.3 volts even after setting the pin low in the code.

The comments describe the code but in short; the clock for GPIOC and GPIOD is turned on. The relevant pins are cleared and then set to output mode (01 according to the reference manual). They are cleared to ensure that they can be set to the proper state. Once set to output mode the bit corresponding to the pin we want to set low is set to 0 using the turnoff() function. thanks!
 

Attachments

MrChips

Joined Oct 2, 2009
34,810
The pins are configured for GPIO by default. If you want to use these pins for USART5 you have to specify this in Cube IDE or configure the Alternate Function yourself.
 

Thread Starter

samyang

Joined Jul 24, 2022
43
Thanks. We are doing this on a MAC, do you think we need to download any specific FTDI software or work with the EEPROM at all? Thanks.
 

Thread Starter

samyang

Joined Jul 24, 2022
43
We have already configured the pins as alternate function in the code. The pins work for using usart on the dev board but not on the pcb.

Starting with the more basic issue first, Here is code to try to configure PC12 and PD2 as output pins to see if they are able to go both high and low, without using USART at this time. When flashing this code and measuring the voltage from the vias, PD2 goes low (to 1 volt) while PC12 remains at 3.3 volts even after setting the pin low in the code. This suggests something is causing the RX via on the PCB (cooresponding to PC12 on the PCB MCU) to never go low.
 

MrChips

Joined Oct 2, 2009
34,810
As you’ve said, something is preventing PC12 from going low. Use a DMM and look for a short to Vcc. Try cutting the trace to FT232.
 

Thread Starter

samyang

Joined Jul 24, 2022
43
Cutting which trace on the PCB? We currently are sending only RX and TX to our STM32. By measuring the RX signal, no matter the operation, it is always tied up to 3.3V
 

Thread Starter

samyang

Joined Jul 24, 2022
43
Thanks for the insight, but then how do we test if the STM and FT232RL can communicate via RX? This is essential.
 

MrChips

Joined Oct 2, 2009
34,810
Your responses are conflicting.

You state that PC12 is operational.
Are you able to configure PC12 as GPIO output and be able to toggle PC12?
 

Thread Starter

samyang

Joined Jul 24, 2022
43
Sorry, PC12 is not operational, it is always tied high. Could this be that the RX pin on the FT232RL is shorted to the pin on the left of it, VCCIO which is 3.3V? But, we have both the STM32 dev boards and the FT232RL dev board. We tested our STM32 on PCB with the FT232RL dev board and it still does not work. We also tried the other way around, using our FT232RL on our PCB with the STM32 dev board and it still does not work. In this case, we could try connecting RX and TX from the FT232RL to 2 new USART pins on the MCU, but is this going to eliminate the error, or is the error with the FT232RL IC shorting? Thanks.
 

MrChips

Joined Oct 2, 2009
34,810
Look at the analysis this way.

PC12 output is connected to RXD input on the FT232.
The connecting trace is always HIGH at Vcc.
There are three possible causes:

1) PC12 on STM32F091 is at fault.
2) RXD on FT232 is at fault.
3) Something else is connected to the trace, Vcc for example.

If you were to temporarily cut the interconnecting trace you would be able to determine the cause of the fault.
You could also use an ohmmeter and test for a short to Vcc.
 
Top