STM32 Send and Receive Data to PC without UART || USB COM PORT || Bluepill

STM32 Send and Receive Data to PC without UART || USB COM PORT || Bluepill

ControllersTech

3 года назад

105,431 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Industrial Automation
Industrial Automation - 01.09.2023 06:57

Hi, I'm using STM32F446RE , i did same procedure i didn't get errors in the program but output is not coming

Ответить
lonny breaux
lonny breaux - 05.08.2023 22:22

you are master!!!!!😍

Ответить
Santosh Sah
Santosh Sah - 13.07.2023 14:37

Thank you sir, your videos on stm32 are very useful. Please make a video on bootloader using UART.

Ответить
mayssem nasri
mayssem nasri - 24.05.2023 13:17

Hello, I need this tutorial now, but it doesn't work I am using STM32F446RE. Are they some updates or something that change?

Ответить
Ferdin Vivian
Ferdin Vivian - 10.05.2023 14:13

Sir How the data is received outside the While loop. U r not enabling any Interrupt or DMA. How it is possible

Ответить
Ran Twil
Ran Twil - 26.03.2023 17:16

Thx! ps: USB interrupt must be enabled

Ответить
Lilia Troudi
Lilia Troudi - 22.03.2023 14:09

Hi! I wanted to thank you first for always replying to my questions. I wonder if we do have to configure the baud rate and others in the hercules utility (logic says that no but I am still confused) Thank you

Ответить
Carlos Eduardo
Carlos Eduardo - 06.03.2023 02:03

Very good video, but I'm having some issues, my buffer only receives the last character sent, and stores it in the first section of the buffer array

Ответить
AJITH ANANDHAN
AJITH ANANDHAN - 22.02.2023 19:00

can i do USB send and Receive in the Keil IDE using registers ?

Ответить
Priyansh Shankhdhar
Priyansh Shankhdhar - 25.12.2022 17:29

i have done everything but during debug session it says target not available

Ответить
nablablaFPV
nablablaFPV - 22.12.2022 14:46

"And now as I connect it, a new serial device gets detected!" It rymes! Happy Christmas

Ответить
Hữu Tùng
Hữu Tùng - 13.12.2022 16:50

On my computer, the notification says USB device is unknown. Does anyone know why?

Ответить
Fa Di
Fa Di - 01.12.2022 18:06

Excellent video, but my WIN 10 is not recognizing the new virtual port. I have installed the official STM drivers, but no success! Did anyone face the same issue

Ответить
Я кстати не понимаю как !
Я кстати не понимаю как ! - 01.11.2022 13:11

hi PLS HELP
When I receive data i got only first char. I mean that when i print my buffRX as a string or even as char (buffRX[0] or buffRX[1]) i got only last char of string that i receive from PC///// PLS HELP

Ответить
Jiraphon Sasomsap
Jiraphon Sasomsap - 29.09.2022 11:12

thx

Ответить
Esteban Gabriel Cabanillas
Esteban Gabriel Cabanillas - 12.08.2022 15:45

Hello! When I'm enabling embedded USB DMA on CubeMX, windows does not recognize the USB device. If DMA is disable, everithing works well. I'm using NUCLEO H7 board. Do you have any explanation for this issue? Thanks!

Ответить
Bogdan Mirkac
Bogdan Mirkac - 23.07.2022 18:14

Hello, thank you for this video. I have a question. What happens if you restart the PC and the board remains connected? Can you still see the device in device manager? Since mine shows the USB descriptor request failed. If I plug it out and plug it back in again it works fine. But I have to do that every time I restart the PC. Do you have any advice on this? How does your device behave? Thanks!

Ответить
Mathew Swabey
Mathew Swabey - 09.06.2022 22:00

Good video, well explained and straight to the point. Thank you

Ответить
Merve Özdaş
Merve Özdaş - 07.06.2022 15:08

I couldn't see which COM, my pc shiws it as STM32 ST Link

Ответить
RUSHIKESH KUMAWAT
RUSHIKESH KUMAWAT - 02.06.2022 20:20

Sir, if I do the Simple Led blink Program, then how can I check the output? I want to do it without ST link.

Ответить
Shubham SR
Shubham SR - 31.05.2022 13:13

works perfectly until i press reset button. It stops sending the string (have to unplug and plug the usb) . I don't see any stopping condition in the code . can you explain ?

Ответить
Irine C Jose
Irine C Jose - 27.05.2022 05:06

Hi, the video was very informative. But can you guide me to any link or video for linux, as HW is not available in linux. I used putty, for getting the transmitted data. But cant do anythng to send data to the board. I am very new to this,if someone can help me with some tutorial guide / site, it will be very helpful.

And also after debugging, running the code in STM32 CubeIDE it also shows an error like this :
libusb: error [udev_hotplug_event] ignoring udev action bind


Can anyone please help me on the above also. Any small clue will be appreciated.

Ответить
Berk Yamanlar
Berk Yamanlar - 22.05.2022 15:00

Hello sir, how can I receive 32-bit integers?
I want receive a value like
uint32_t value;

Ответить
Андрей Ушаков
Андрей Ушаков - 13.05.2022 20:39

best

Ответить
usman haider
usman haider - 11.04.2022 09:53

i am limitted to recevie 64 bytes. after 64 bytes buffer overflows. "*Len" pointer in "static int8_t CDC_Receive_FS(uint8_t* Buf, uint32_t *Len)" overflows when reaches to 64.

Ответить
Tommy
Tommy - 10.03.2022 16:37

Hello I have a question about the Len parameter in the CDC_Receive_FS function. What is it for? and what am i supposed to fill in? can I leave it out?

Ответить
Ehab N
Ehab N - 26.02.2022 00:53

Very Nice work, Thank You !

Ответить
Thomas Perri
Thomas Perri - 20.02.2022 17:24

hello I do not have a "USB" to choose from in my Cube MX. only USART?

Ответить
dnyaneshvar salve
dnyaneshvar salve - 15.01.2022 15:39

(Edit - IT'S WORKNG NOW)...

I am using stm32L475 and I cant see options for usb as shown in video.
I can see three options
USB DEVICE
USB HOST
USB_OTG_FS
ALL WERE GRAY

but when I selected there pins,
I can enable USB_OTG_FS .
I proceed with it, but in my project I can find any usb_cdc_if.c.
Even the USB device folder is not generated.

Ответить
Franck Ciccio
Franck Ciccio - 23.12.2021 15:17

Hi, on my computer , on debugging, it doesn't transmit because it return USBD_BUSY, does someone have the same problem?

Ответить
Prasad Elumalai
Prasad Elumalai - 04.12.2021 20:05

It was very useful.. I tried out in my black pill board.. worked amazing.. And speed of transmission is USB_ Full speed ❤️.. Loved it..! Thanks.. Now a big bye bye to Arduino 🤣

Ответить
fseeletronicos ©
fseeletronicos © - 29.11.2021 03:43

My board is not being recognized as COM port. What should I do?

Ответить
Prasanna Kumar Routray
Prasanna Kumar Routray - 22.11.2021 12:55

Nice!. The data is transmitted in which format? char or hex? What if I send uint8?

Ответить
Itay Jacob
Itay Jacob - 18.11.2021 22:06

Are there any STM32 modles that can do this without an extranal resonator?

Ответить
ERTUĞRUL KARAKULAK
ERTUĞRUL KARAKULAK - 08.10.2021 14:04

Thank you, very helpful video.

Ответить
Mustafa Mert Sevim
Mustafa Mert Sevim - 07.10.2021 19:58

Thank you for the video, i have a question I am using stmf407g and I do not have USB and USB_DEVICE access from pinout and configuration. Could you help me ?

Ответить
Brendan Hayes-Oberst
Brendan Hayes-Oberst - 19.09.2021 18:57

Can the data received from the stm32 be saved to a text file continuously until the code has finished running?

Ответить
Brendan Hayes-Oberst
Brendan Hayes-Oberst - 19.09.2021 18:52

what board are you using? Did you make your own?

Ответить
Tomasz Paździora
Tomasz Paździora - 05.09.2021 20:05

Very helpful tutorial! But i have a question. How do you debug and transmit data in the same time? Did you connect ST-link and USB in the same time to your bluepill?

Ответить
Luis Soto
Luis Soto - 01.09.2021 22:06

hi people! i'm using the same stm32f103c8t6, and i've tested the code as the video and it works, but without the debugger (stlink-v2), anyone knows if there's a problem using usb communication and debugger at the same time? or maybe i could be missing something... from now, thanks

Ответить
محمدرضا رادپور
محمدرضا رادپور - 23.08.2021 09:38

I run the program and when the computer sends "start", the micro sends "Hello World from USB CDC" but when I debug the program, micro and PC can not send anything anymore and Sending stops and when I go to Live Expressions in the Value field is written "Target not available". what is the problem?

Ответить
fattonyxxl
fattonyxxl - 19.08.2021 15:24

Would this work if I have no HSE Crystal fitted? I was using a nucleo which didn't have one fitted it worked for weeks and now doesn't worried it might be the crystal

Ответить
RanHam
RanHam - 13.08.2021 13:58

I'm having a hard time using Cdc_transmit_fs to send an int. I've tried intoa and sprintf with no luck. Any help here?

Ответить
Hazim Bedran
Hazim Bedran - 13.08.2021 01:35

I followed the same steps. but why on stm32f103c8tx the usb does not working " USB device not Recognized"?

Ответить
TOSHIBA MASTER
TOSHIBA MASTER - 29.07.2021 07:22

How recieve packet from PC

B0=254; // sync
B1 //number of variable
B2//High byte
B3// byte
B4// byte
B5=//Low Byte
Var[B1]=B2<<24+B3<<16+B4<<8+B5
If the stream fails, then in the incoming stream we look for synchrobyte 254 (skip bytes until we have received 254)

Ответить
Nupura
Nupura - 28.07.2021 08:36

hello,..i am having a "driver error" in the devices for connected usb...can you please tell how to fix it??

Ответить
Francisco Reis
Francisco Reis - 04.06.2021 18:39

Hey, Everything works almost fine. When trying to receive data on my PC, althought the virtual port is detected (COM12) in my case, the serial port wont open when I press "open". Says windows error #5 in docklight. In hercules it says: Serial port COM12 opening error. Any ideas?

Ответить
Andrea Avallone
Andrea Avallone - 01.06.2021 13:34

Hello, thanks a lot it worked for me! Excuse me, how can I pass a simple integer or float stored in a variable, instead of a string?

Ответить