Тёмный
No video :(

STM32F4 Discovery board - Keil 5 IDE with CubeMX: Tutorial 15 USB VCP - Updated Dec 2017 

Mutex Embedded
Подписаться 22 тыс.
Просмотров 40 тыс.
50% 1

Опубликовано:

 

22 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 90   
@ferchuu9
@ferchuu9 4 года назад
God bless you dude, it is really anoying that this simple stuff goes so difficult to figure out
@ZafarIqbal-oz6mf
@ZafarIqbal-oz6mf 3 года назад
Thanks a lot for sharing this, I was searching for the VCP over USB for some time and other tutorials made life very complicated.. Thanks again for sharing this
@AhmedElshorbagy97
@AhmedElshorbagy97 2 года назад
thank you very much for this video
@RAJ58078
@RAJ58078 3 года назад
Excellent way of explanation. I loved it. Thank you
@VigneshD25
@VigneshD25 4 года назад
Hello, I am using STM32F429i Disc1 Board. I followed the exact same procedure as demonstrated. But the device isn't recognized by the PC at all. I couldn't find the virtual COM port of USB OTG. I verified heap size, installed VCP Driver (Am using Windows 10) and double checked everything. Couldn't figure the issue. Please help.
@hlamzar
@hlamzar 3 года назад
did you manage to get it working for this board?
@maxwong1501
@maxwong1501 6 лет назад
hi Mohamed, Your video is brilliant. Could you please make a video of how to use the STM32F4 as a speaker(audio output device)? For example, read the data from the audio output through micro-usb and write the data into memory. I will be appreciate if you can help me!
@rajeshraturi9916
@rajeshraturi9916 2 года назад
Hi I am using F411 board and there is no separate individual comport created its showing the same com port as previous but the working of com port is shifted to mini usb com port
@yusufrabie8148
@yusufrabie8148 5 лет назад
Great tutorials. simple and very clear. thank you very much
@Kefford666
@Kefford666 4 года назад
Thanks for this video. I already got everything set up, connecting and transmitting data back and forth but I was unsure how to go about using the driver w.r.t receiving data. Do you think it’s necessary to have the callback to main? Essentially the CDC function is a callback so you could just put your logic in there?
@mutexembedded2206
@mutexembedded2206 4 года назад
Hi, Usually it is better not to process data inside the callback, in advanced systems with RTOS, data are added to some sort of processing queue
@Kefford666
@Kefford666 4 года назад
MYaqoobEmbedded Thanks for your suggestion :) I’ve decided to implement a ring buffer message system as a separate module where incoming messages can be queued and processed. So far so good :)
@mutexembedded2206
@mutexembedded2206 4 года назад
@@Kefford666 Good :)
@ukaszdrozdz4638
@ukaszdrozdz4638 4 года назад
Great tutorial, thank you :)
@Zurenio
@Zurenio 6 лет назад
Thank you very much, excellent video....!!
@Pex230893
@Pex230893 2 года назад
thank you so much, do you know how stablich conexion with bus CAN between two boards stm32f407vet6?
@subramaniantr2091
@subramaniantr2091 5 лет назад
Hi Mohamed, So we cannot use the st link itself to do this virtual com port if we have older version of this board right? I read it so online. But would like to know it from you. I wanted to use the virtual com port for a debug purpose to send messages to terminal. That's why. I'm just getting started with this microcontroller though I have had this board for quite a long time.
@mutexembedded2206
@mutexembedded2206 5 лет назад
Do a quick read to the User Manual of your board, most case if it feature micro USB, then you should be able to do so
@fernando.liozzi.41878
@fernando.liozzi.41878 3 года назад
Genius!!!!, Thanks!!!!
@xilinx80
@xilinx80 6 лет назад
Thank you for the great and clear tutorials Mohamed. Will you make a tutorial for CAN communication as well?
@Kefford666
@Kefford666 4 года назад
Although this comment is 2 years old, I second this! Haha
@nssalon
@nssalon 5 лет назад
Thank you, this is very usfull for me
@subramaniantr2091
@subramaniantr2091 5 лет назад
This might be a dumb Question. I believe that there is some kind of interrupt generated when you send data from PC to the COM port causing the static function to be called. Is it correct? I couldn't really trace it from the code. Could you please help understand?
@mutexembedded2206
@mutexembedded2206 5 лет назад
That is correct
@franckciccio8032
@franckciccio8032 2 года назад
Hi , I am using an STM32f401, it has only one usb port. I tried your function but it doesn't work, do you know why?
@DQMedia
@DQMedia 3 года назад
How to get fast data. Eg. Im reading 4096 ADC samples at 1 sec .. i need to store or transmi to pc very fast . How ,,,give reply.
@HB9GZE
@HB9GZE 6 лет назад
great channel, thx!
@designworks7347
@designworks7347 6 лет назад
good man keep making video for us
@victorgamboa6660
@victorgamboa6660 4 года назад
it was really healpful
@sayalijoshi5010
@sayalijoshi5010 3 года назад
Can we use St-Link ( The Mini USB VCP) for communication with PC. Because the VCP of the ST-link is not connected to UART of STM32F407. Also are the drivers of USB VCP of the Stm(Mini) available for Windows 10.
@subramaniantr2091
@subramaniantr2091 5 лет назад
Mohamed, Your videos are really good and I wanted to know if you think it's possible to develop a driver for USB by ourselves like you did for ADC.
@asimabdulqayyum3360
@asimabdulqayyum3360 6 лет назад
Hi i want to control a robot arm with mouse(buttons and cursor) connected to my PC(not with Stm directly)..is it possible to control it that way?if yes so can you share any idea how to achieve that..the flow will be like this..Mouse->PC->Stm->robot.
@husamdarwish7009
@husamdarwish7009 4 года назад
Selam Mohamed, Is it possible to combine VCP and HID in the same USB Interface? I mean with two different descriptors so I can see HID device and the Virtual Serial com at the same time on my machine. If yes would you please make a video for it? Thank you
@ghassenb2492
@ghassenb2492 6 лет назад
I am working with Stm32f207zg as a host and I want to send data like you did to a device which is another microcontroller and the only function available is USBH_CDC_Transmit and i didnt understand how to work with it i need your help
@safiakhan2034
@safiakhan2034 4 года назад
I tried the transmit data portion of this video on my stm32f103 board and it works fine but the receive portion does not although i did the same code which is in this video, can anyone tell me the reason please please
@babotvoj
@babotvoj 2 года назад
Hello, why did you use that specific baud rate in the terminal?
@luisantoniovieiravital5292
@luisantoniovieiravital5292 4 года назад
Great !!
@nhatcomnhom
@nhatcomnhom 5 лет назад
nice
@babotvoj
@babotvoj 3 года назад
Hello, is there a function that transmits uint16_t valuses?
@mutexembedded2206
@mutexembedded2206 3 года назад
You can make one for your application using the u8 provided by library. It is easy
@babotvoj
@babotvoj 3 года назад
@@mutexembedded2206 thank you for your answer, but I am bad at C
@mutexembedded2206
@mutexembedded2206 3 года назад
@@babotvoj You can read a bit about variables types and typecasting
@tahirajabeen1698
@tahirajabeen1698 6 лет назад
Hi Mohammad , when I connect the FS port to my computer, it is not detected, can you tell me what is going wrong? The computer fails to acknowledge that anything is connected at all.
@mutexembedded2206
@mutexembedded2206 6 лет назад
Tahira Jabeen Hi Tahira, You need to install STM VCP USB driver: www.st.com/en/development-tools/stsw-stm32102.html
@tahirajabeen1698
@tahirajabeen1698 6 лет назад
I am using a STM32F746G- Discovery board, will the clock configuaration be different for it?
@barrykeane2716
@barrykeane2716 3 года назад
Hi Mohamed, Thank you for these videos! On this one, if I send "Hello" as you did, everything is fine, but if I type one character at a time, I get "H@ el@l@o" with "junk" characters. Why is that?
@raoufjmal6674
@raoufjmal6674 4 года назад
how can i use the Virtual COM port for windows 10
@mutexembedded2206
@mutexembedded2206 4 года назад
Need to install STM VCP USB Driver. You will find that in ST Website
@raoufjmal6674
@raoufjmal6674 4 года назад
@@mutexembedded2206 worked out well, thank you
@raoufjmal6674
@raoufjmal6674 4 года назад
@@mutexembedded2206 how can i display a picture in real term terminal used usb virtual com port ?
@pranjalshrivstava6519
@pranjalshrivstava6519 3 года назад
Hi , @@mutexembedded2206 the website says thee drivers aren't needed for Windows 10, is this still needed to be done?
@roddamusha5120
@roddamusha5120 6 лет назад
Hello, great video. I want to know how to configure OTG/dual mode. I am using cube, so I have selected the option but I am not sure what is the code to enable this dual mode. Your help would be appreciated.
@mutexembedded2206
@mutexembedded2206 6 лет назад
Hi, That's an interesting one,, I have not used this mode before,, definitely worth a look.. But I don't know the answer now I'm afraid.
@roddamusha5120
@roddamusha5120 6 лет назад
thanks for the reply, try to come up with a video referring this feature it would be very helpful and appreciated. Can I ask you if there is any tutorial explaining about the sleep modes and how to implement them in code.
@mutexembedded2206
@mutexembedded2206 6 лет назад
roddam usha Hi Roddam, Putting the STM to sleep and then perhaps wake up with an interrupt?
@lessystemesembarques6403
@lessystemesembarques6403 6 лет назад
Hey Mohamed, when i connect the usb to the laptop i have an error: the laptop does not recognize the usb, i checked my device manager, there is no virtual com, so this is the problem. my OS is Windows 10 can ou help me please
@mutexembedded2206
@mutexembedded2206 6 лет назад
elmzaiti youssef Salam, You need to install STM32 VCP USB driver.. google it. Good luck
@kirt143
@kirt143 5 лет назад
if you are using STM32CubeMx to generate code, go under "Middleware" category in "Options" and select "USB_DEVICE" and then select "Communication Device class (Virtual Port Communication)" and then generate code. you will be fine.
@subramaniantr2091
@subramaniantr2091 4 года назад
Is there a non-CubeMx version for USB?
@mutexembedded2206
@mutexembedded2206 4 года назад
Yes, I personally do not favor using CubeMX for advanced middleware like USB. I will make non-cube videos over the next couple of months.
@subramaniantr2091
@subramaniantr2091 4 года назад
@@mutexembedded2206 thank you. In fact if you could do timers without cube MX for start, it would be too good. I tried some exercises by myself using the default HAL and understanding each register which worked and motivated a lot even though it took some time.
@souhardbekal7502
@souhardbekal7502 6 лет назад
hi Mohamed, can you say a how to send adc values from microcontroller to pc through usb. thank you.
@mutexembedded2206
@mutexembedded2206 6 лет назад
Hi, You just need to convert the ADC values to string,, you can use sprintf function to so that, it's that simple. Good luck
@Moravaneni
@Moravaneni 6 лет назад
Very nice video. Can u please explain about the rcc setting...
@juancaxe
@juancaxe 6 лет назад
Hi Mohamed, What Windows_OS are you using?
@mutexembedded2206
@mutexembedded2206 6 лет назад
Hi Juan, 10
@juancaxe
@juancaxe 6 лет назад
MYaqoobEmbedded and how do you program the board, by the virtual COM port 4? In that case, what driver do you use. Because I can only program mine by the USB driver and it dont generate any COM port.
@chuayeehong5894
@chuayeehong5894 6 лет назад
what is the overall code size?
@alaeddinebakkay7556
@alaeddinebakkay7556 5 лет назад
+MYaqoobEmbedded hi mohamed how are u ? i installed the virtual com driver from st website but the port still not detected , when i checked the device manager i find only stlink virtual com !!!!!! i can't know what's the problem !!!
@mutexembedded2206
@mutexembedded2206 5 лет назад
Hi Ala, Search for the USB ports on device manager and update the undefined USB port with Auto update. Another cause could be the wire.
@alaeddinebakkay7556
@alaeddinebakkay7556 5 лет назад
+MYaqoobEmbedded yes i did an update and i tried with another wire but same problem , really weird !!
@mutexembedded2206
@mutexembedded2206 5 лет назад
Interesting! You may forgot to increase Stack & Heap size like I shown at 2:17
@mutexembedded2206
@mutexembedded2206 5 лет назад
@@behnammoradi1449 Hi, Go to your device manager when you plug the ST Micro USB (i.e. you need to plug both USBs one for ST Link&power other for USB communication). Then check for undefined USB ports.
@chiahungmou7351
@chiahungmou7351 4 года назад
@@mutexembedded2206 Awesome! I did forgot to increase Stack & Heap size like you shown at 2:17 and got same problem like yours.
@shivakumar-lv6wr
@shivakumar-lv6wr 6 лет назад
Hey is there anyway we can connect this VCP to the USART2 ?
@hectoreliucaballerodimas6752
@hectoreliucaballerodimas6752 3 года назад
yes check the documentation of the stm32f4 in st you need to solder PA2 and PA3 to the stlink, but only if you have the DISC-1 version
@designworks7347
@designworks7347 6 лет назад
you can make gui with visual basic 8 and emwin builder
@abdulrasheed01
@abdulrasheed01 6 лет назад
I have installed VCP_V1.4.0_Setup.exe from st.com. I am able to build the program and load on the board and run, when i connect the USB to my laptop, device manager i see STMicroelectronics Virtual Comport 4 with yellow icon (not initialised fully). Also com4 is not getting open hyper terminal serial port program. Can you please advice what driver we need to install on laptop.
@mutexembedded2206
@mutexembedded2206 6 лет назад
Hi Rasheed,, Sorry for my very late reply, just saw it now,, Do you still have the problem?
@abdulrasheed01
@abdulrasheed01 6 лет назад
MYaqoobEmbedded yes it worked
@mutexembedded2206
@mutexembedded2206 6 лет назад
Awesome!
@mehrezharrazi1364
@mehrezharrazi1364 6 лет назад
hello abdulrasheed01 , i am having the same problem, do you mind telling me how you fixed it ?
@mutexembedded2206
@mutexembedded2206 6 лет назад
Hi Mehrez, You would need to install the STM VCP USB driver. You can download it from here: www.st.com/en/development-tools/stsw-stm32102.html Good Luck :)
Далее
~/.dotfiles in 100 Seconds
13:54
Просмотров 415 тыс.
The Clever Way to Count Tanks - Numberphile
16:45
Просмотров 1 млн