cancel
Showing results for 
Search instead for 
Did you mean: 

uart printf not working, please help.. (STM32F401RE eval board, using HAL driver)

ckim
Associate II
Posted on December 04, 2015 at 13:46

Hi, all

A newcomer in this product, I've been trying to do this for several days now..

I'm using STM32F401RE evaluation board, and running the uart_printf example project that came with STM32cubeF4 package. The example project uses HAL driver, not StdPeriphLib drivers. I added a include path to avoid build error.

When I repeatedly do printf(''CGCG'') with 0.5 interval, I can see the UART signal going from the MCU(STM32F401RE) to the MCU for USB connection(STM32F103CB) correctly. But I cannot see the data on my win7 PC uart terminal (9600, 8bit, odd, 1 stop, no flow con). When I press key 'C' or 'G' or any character in my PC terminal, it appears in the UART signal in reverse direction. That is, the UART signals between F401RE and F103CB looks normal. I can see STM32F401RE chip's USART2 DR register changing according to the key I press.

My question is how can I check STM32F103CB chip's UART controller registers? Is there any way I can do that with uVision5?  Can my board be broken?

0690X00000603LfQAI.jpg

10 REPLIES 10
Posted on December 16, 2015 at 05:46

The occasional failures I see are that it doesn't enumerate the COM port, or the terminal application and driver stack does cleanly disassociate when the port is removed. Some of this is a systemic Microsoft/Windows issue with how it treats ''legacy'' devices like serial port, and it's poorly expressed methods to handle a COM port coming/going and terminal apps that expect/support that.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..