2024-07-17 12:05 PM
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
2024-07-17 01:02 PM
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:
SB11 + 12 , to connect to usart1 of F072 ; then send on usart1 -> st-link/VCP -> PC (terminal or console in IDE).
2024-07-18 11:07 AM
Hi,
I tried closing those jumpers and enabling the USART1 Interface:
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:
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
Best,
Kevin
2024-07-18 11:15 AM - edited 2024-07-18 01:01 PM
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:
2024-07-18 12:13 PM
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.