cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to use UART over USB on STM32F051 Discovery board

alexandert62
Associate

Hello all,

I am trying to send "Hello World" to my computer through using the guide below but nothing is sending to the port. I cant see anything on Tera Term. (https://wiki.st.com/stm32mcu/wiki/STM32StepByStep:Step3_Introduction_to_the_UART) (of course I selected STM32F0disco instead because I am not using the board in the example) I have also tried following this tutorial (https://www.youtube.com/watch?v=isOekyygpR8) but I have still seen nothing.

I am using a STM32F051 Discovery Board and I am using UART2. PA2 is Tx and PA3 is Rx. When I put an oscilloscope to PA2 I can see quite clearly that the Tx is working and transmitting the data, but it does not look like it is making it to the USB. I don't really care too much about the Rx because i am only trying to send data from the board to the PC. (I am using STM32CubeMX/STM32CubeIDE by the way).

I have tried switching cables, switching OS, switching PC's, Switching to UART1 (Which also work fine). I looked at the user manual (UM1525) and Soldered SB14 and SB15 but that did not change anything. I doubt that the USB or the PC is the problem because I can easily upload the program to the board and debug without a problem. I have used Tera Term and PUTTY through COM7 which is my PC's ST virtual Port. This also does not seem to be the problem. 

Personally I believe that the problem lies somewhere on the board itself or in the programming but I cant figure out what it is. If someone is more versed in this area can help me out I would be very grateful. Also, I am very new to this whole programing, microcontroller, breadboard, etc. so please put recommendations in very simple terms.

-Alex

 

1 ACCEPTED SOLUTION

Accepted Solutions
Peter BENSCH
ST Employee

Welcome @alexandert62, to the community!

I'm immensely sorry you fell for this trap: the STM32F0DISCOVERY is one of the first to come out many years ago and already has an ST-LINK/V2, but one with the smaller STM32F103C8T6. Unfortunately, its flash is not yet sufficient for functions such as mass storage or VCP (Virtual COM Port), which were added later with the larger STM32F103CBT6 and are of course included in all NUCLEO boards, younger DISCOVERY or EVAL boards, for example.

By the way, you can also detect the presence of the VCP with the STM32CubeProg if you connect the ST-LINK of the respective board and start the function Firmware upgrade. The current ST-LINK type is then displayed, e.g. "STM32 Debug+Mass storage+VCP". With your old DISCO, only "STM32 Debugger" appears, i.e. without VCP.

I therefore recommend that you start with one of these newer boards, experience success with it and thus retain your joy of discovery.

Hope that helps?

Regards
/Peter

In order 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

3 REPLIES 3
Peter BENSCH
ST Employee

Welcome @alexandert62, to the community!

I'm immensely sorry you fell for this trap: the STM32F0DISCOVERY is one of the first to come out many years ago and already has an ST-LINK/V2, but one with the smaller STM32F103C8T6. Unfortunately, its flash is not yet sufficient for functions such as mass storage or VCP (Virtual COM Port), which were added later with the larger STM32F103CBT6 and are of course included in all NUCLEO boards, younger DISCOVERY or EVAL boards, for example.

By the way, you can also detect the presence of the VCP with the STM32CubeProg if you connect the ST-LINK of the respective board and start the function Firmware upgrade. The current ST-LINK type is then displayed, e.g. "STM32 Debug+Mass storage+VCP". With your old DISCO, only "STM32 Debugger" appears, i.e. without VCP.

I therefore recommend that you start with one of these newer boards, experience success with it and thus retain your joy of discovery.

Hope that helps?

Regards
/Peter

In order 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.

Well that sure is a bummer. Thank you so much for your help, it is greatly appreciated.

Surely there is another way to upload data to the PC right? Right now I am just trying to get a simple "Hello world" message from the board to my computer. 

My end goal is to have something like a temperature sensor use I2C to send data to the board, then have the board send that data to my PC so I can download it and then record, chart, etc.

If you or anyone has some resources that may help please send them my way!

Thanks!

- Alex

Well, with the STM32F0DISCOVERY you can use e.g. USART1 or USART2, but you still need a converter that converts UART into a format for the PC, e.g. UART-USB.

In order 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.