cancel
Showing results for 
Search instead for 
Did you mean: 

32F072BDISCOVERY Serial Print

kfc-eng
Associate

Hi Community,

I am getting started with STM32 chips and I recently acquired the 32F072BDISCOVERY dev kit (https://www.st.com/en/evaluation-tools/32f072bdiscovery.html#overview). I downloaded the STM32CubeIDE and have been able to write,compile, and program simple code to blink one of the LEDs in the board. I was wondering how to set up a com port to serially print data? When I plug in the board to my computer through either of the USB ports (USB USER or USB ST-LINK), I do not see a COM port come up in my device manager, I am assuming it is because I have to set it up. If anyone has any guidance on how to do this, I would greatly appreciate it! 

 

Best regards,

Kevin 

4 REPLIES 4
AScha.3
Chief II

Hi,

you could setup a USB-device-CDC  , using Cube, gen. code, flash ;

then get serial over USB , on USB user port you get it then by your program working.

+

Or you try to update the st-link, to V2.1 with CDC serial - if possible, you see it in the update window, to choose : 

just st-link, or st-link + VCP  (virtual com port). If possible to select, do it, then after update you should see it in PC system.

On F072 board, then check connection:

AScha3_0-1721246255232.png

SB11 + 12 , to connect to usart1 of F072 ; then send on usart1 -> st-link/VCP -> PC (terminal or console in IDE).

If you feel a post has answered your question, please click "Accept as Solution".

Hi, 

 

I tried closing those jumpers and enabling the USART1 Interface:

kfceng_0-1721325866641.png

However, i still do not see the COM port come up. When you mention updae the st-link, is there an external tool I can use to do that. I tried to "upgrade" but it does not let me select a version called 2.1, see below: 

kfceng_1-1721325982202.png

I haven't tried to print anything yet, but I do not see a COM port come up when I plug in the discovery kit. I only see the st-link 

kfceng_2-1721326042301.png

 

Best,

Kevin 

Ok, (i put the j-link debug on my F072-disco ), so i cannot try now.

But if you stay on V2.0 , no option to V2.1 - then no VCP option there.

(And i could ask STM, why connect uart1 to st-link, if no option to use it -- =

Did you try : open in update mode ? If cannot set V2.1 , with VCP , no serial there.

Try..

+

If no way, only make "your" CDC by software; 

setup a USB-device-CDC  , using Cube, gen. code, flash ;

then get serial over USB , on USB user port you get it then by your program working.

+ VCP on user USB then, not on st-link usb.

+

just look on your board: if st-link has STM32F103C8T6 - it could never work, because not enough flash ;

afaik st-link V2.1 needs an STM32F103CB , 128KB flash.

 

btw

on other board, like STM32F3DISCOVERY

you see:

AScha3_0-1721326855034.png

 

If you feel a post has answered your question, please click "Accept as Solution".

The STM32L0-Disco was from around the time things started to transition to mbed support and ST-LINK/V2-1

The ST-LINK/V2 is running on a smaller, less capable, STM32F103 IC, so you can't "upgrade" it to support the MSC and VCP (COM)

If you want a serial port, might be easier to get a SiLabs/FTDI adapter, or RPi Pico to fill that role, of look at newer DISCO boards.

The CM0(+) also does not support the SWV (Serial Wire Viewer) methods.

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