STM32 USB CDC (Virtual Com Port) with CubeMX HAL in 6 minutes

STM32 USB CDC (Virtual Com Port) with CubeMX HAL in 6 minutes

chiptron

5 лет назад

53,414 Просмотров

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


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

TehNocMaster
TehNocMaster - 11.05.2023 05:12

Thanks boss! Got me pointed in a direction.

Ответить
Ian Abercrombie
Ian Abercrombie - 17.11.2022 19:00

Another video with no audio. Makes it impossible to follw and pretty well useless. In addition, it is now too out of date since the interface has changed.

Ответить
Vishwesh G M
Vishwesh G M - 02.11.2022 21:02

Hi why the baudrate set to 9600?

Ответить
Sadegh Moradi
Sadegh Moradi - 08.05.2022 20:17

Thank you!

Ответить
Stefan S
Stefan S - 05.03.2022 21:41

Yet another video that should have been a website. Also, adds zero explanation to using the wizzard. Who exactly needs that?

Ответить
Carlos Freitas
Carlos Freitas - 25.07.2021 18:15

Very usefull!!!!!!! Thank you.

Ответить
My Vin
My Vin - 16.11.2020 03:00

Do you hear anything?

Ответить
Jupp Kaltofen
Jupp Kaltofen - 29.09.2020 03:25

The main problem is, that this demo is not representativ because ST often update the MXCube, CubeIDE and the HAL library. If you ever looked into the HAL, you get shocked how bad the coding qualtity could be. Similar mention, if you look into the sources of freeRTOS.
The demonstrated demo works ,if you use the HAL V1.1.2 from 23.sep.2016 and you advise the CubeMX using this old HAL. Any HAL Versions later, this does not works.

I am not know why this happens, because the generated Code looks similar. But the windows system device manager could not start the registered cdc device.

I had regenerate a final working version and migrate the ioc-file generated from an older version into the regular offered version of MXCube and regenerate the code for KeilMDK again. The result was similar - the new code looks very similar, but does'nt work.

As a cross check, i had recompiled the old project, where the ioc.file was picked from and this works pretty nice.

Well, i like the concept of the HAL- and the CMSIS libs to get the start up from scratch easiers. But teh code quality is very bad und looks that none of ST has ever heard from a common coding style. A debugging session of an unknown code with a soucre code style like freertos or HAL, is a horror task.

Ответить
Tanja Berisavljevic
Tanja Berisavljevic - 07.08.2020 20:17

zer gud

Ответить
ade roxie
ade roxie - 18.06.2020 08:14

i want to send sensor data through USB which contain INT data type, any idea ? cause I've facing some problem sending INT data types

Ответить
Luis Antonio Vieira Vital
Luis Antonio Vieira Vital - 21.04.2020 16:35

Hi! thanks for this tutorial. How can i increase the speed receiving data from the pc? I need about 8Mbps using STM32F103, but I can only get half that speed!

Ответить
seza acar
seza acar - 09.03.2020 11:26

i have stm32L476RG i am trying to get 3 cdc port , i am getting some problems . if someone help me i would give more detail to solve it . Thank you , helpfull video

Ответить
Brent Miller
Brent Miller - 25.02.2020 23:21

Very helpful! Thanks for taking the time to put this together!

Ответить
Ilia Nozdrachev
Ilia Nozdrachev - 15.02.2020 15:21

so good. Withot some useLess information just howto exelent!

Ответить
PurpleMill
PurpleMill - 01.01.2020 00:12

Pretty unhelpful for anything serious. 1) you need to check to make sure the CDC isn't busy transmitting oo it will simply ignore your transmit. 2) Most CDC devices are going to need to receive data and there is nothing here about how to accomplish that or process the incoming data. This is a 6 minute video about configuring a project in CubeMX and 5 seconds of including a CDC_Transmit_FS() function call.

Ответить
Simone Moretti
Simone Moretti - 14.12.2019 00:08

Great!!! Thank you!!!

Ответить
Benjamin Wolf
Benjamin Wolf - 06.12.2019 23:03

Thanks a lot for this video! I am moving from simpler MCUs (like C51, ARM7) where i was able to know all the internal registers and its meanings. And now I am getting messy about all this stuff in STM32. Actually, is there any simple way for to check (get noticed) about awaiting incoming character(s) on RX? And get know when TXbuffer is empty or send it byte per byte? Usualy I am using the serial while doing few other thinks. I cannot stand still until the message is sent,. My usual way was checking serial (in main while loop) like this.


void Send232_2(void)
{
if (plssend232_2 == 0) plssend232_2 = RS232TXLENGTH;
}

void Serve232_2 (void)
{
unsigned char i=0;
unsigned char c = 0x00;
if (plssend232_2 > 0)
{
if ((COM1STA0 & BIT6) == BIT6) //if TX empty
{
i = RS232TXLENGTH - plssend232_2;
c = strts232_2[i];
if (c != 0)
{
COM1TX = c;
plssend232_2--;
}
else plssend232_2 = 0;
}// eof if buffempty
} //eof if plssend
}

Ответить
Cậu Bé Conan
Cậu Bé Conan - 19.11.2019 11:08

Is this possible to use USB CDC class for both WinUSB and VCP at the same time? Thanks!

Ответить
Jorge Mendieta
Jorge Mendieta - 12.09.2019 13:36

Excellent video, just what i needed, thank you !

Ответить