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

แชร์
ฝัง
  • เผยแพร่เมื่อ 8 ก.พ. 2025

ความคิดเห็น • 203

  • @technics6215
    @technics6215 ปีที่แล้ว +1

    Setting byte after last one would be enough, no need to memset whole buffer. Just read it until '\0'. This is only one thing that that could be improved that I was able to catch in ControllersTech videos after few years of watching. You are awesome!

  • @idanderi1970
    @idanderi1970 11 หลายเดือนก่อน

    You are a wonderful human being, this is my favorite video on the internet now

  • @malgailany
    @malgailany 4 ปีที่แล้ว +6

    Clear, informative, and well-executed Video.
    Probably, moving the pointer back to point to the beginning of the buffer after the transmission will also solve the problem of having the old data in the receive buffer.
    Thank you!

  • @prasoft2999
    @prasoft2999 4 ปีที่แล้ว +3

    Thank you sir, your videos on stm32 are very useful in learning it.

  • @prasadelumalai946
    @prasadelumalai946 3 ปีที่แล้ว +6

    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 🤣

    • @pejvaaksalimi2311
      @pejvaaksalimi2311 8 หลายเดือนก่อน

      Hi. Does it mean that you can send at 480 Mbit/s?

  • @MegaYucca
    @MegaYucca ปีที่แล้ว

    Thank You very much for this video. Your example is working on My side too.

  • @Swabey89
    @Swabey89 2 ปีที่แล้ว +1

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

  • @franckciccio8032
    @franckciccio8032 3 ปีที่แล้ว +4

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

  • @santoshsah9250
    @santoshsah9250 ปีที่แล้ว

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

  • @botak333
    @botak333 ปีที่แล้ว +1

    How about stm32 usb HID sir? Do u have the video how to send and recive data???

    • @botak333
      @botak333 ปีที่แล้ว

      ​@ControllersTech

    • @ControllersTech
      @ControllersTech  ปีที่แล้ว

      Check out stm32 usb Playlist in the description of this video.

    • @botak333
      @botak333 ปีที่แล้ว

      @@ControllersTech okk, i want ask question, how to send and recive data from the game sir?? Like ffb, or other sir?? Its must be used API?? Or posible direct input only??

  • @yusufortaca3555
    @yusufortaca3555 3 ปีที่แล้ว +1

    It was a very nice instructional video. Thanks.

  • @basiltabraham3499
    @basiltabraham3499 11 หลายเดือนก่อน +1

    Hey, I use stm32 blackpill with stm32f411ce6u n the problem i face is when the product connected forthe first time via USB c interface it shows up as serial port and after installation on stlink v2 driver it isn't showing or there is no response via USB c n the c port is giving the power and the board turn on

    • @ControllersTech
      @ControllersTech  11 หลายเดือนก่อน +1

      Just run this example on the board. The USB C port will be detected when the example is running.

    • @basiltabraham3499
      @basiltabraham3499 11 หลายเดือนก่อน

      @@ControllersTech not anymore I brun it

  • @noweare1
    @noweare1 4 ปีที่แล้ว +2

    I wonder why on the PC (Host) side we are still limited by serial protocols even though the host has full capability for full speed usb.

  • @fadi0802
    @fadi0802 2 ปีที่แล้ว +3

    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

    • @panteral6179
      @panteral6179 10 หลายเดือนก่อน

      i think i have the same issue, did you resolved that?

    • @fadi0802
      @fadi0802 10 หลายเดือนก่อน

      @@panteral6179 I have solved it yet, but I think about using another library than, that from ST electronics. I will try it next weeks

  • @tomaszpazdziora4388
    @tomaszpazdziora4388 3 ปีที่แล้ว +2

    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?

    • @ControllersTech
      @ControllersTech  3 ปีที่แล้ว +3

      Yes

    • @panteral6179
      @panteral6179 10 หลายเดือนก่อน

      @@ControllersTech do You have ideas what can be wrong? If I just load project to BluePill, PC recognises com port, but if I going to Debug it, PC can't see any com-port devices

  • @I_moh
    @I_moh 2 ปีที่แล้ว

    Very Nice work, Thank You !

  • @hda90
    @hda90 4 หลายเดือนก่อน

    For those who are unable to communicate STM32 development board with serial port
    Use USB hub/ OTG cable at receiver (laptop) side. It will work flawlessly.

  • @csigabigaboca1987
    @csigabigaboca1987 ปีที่แล้ว

    I don't understand why you need memcpy, why don't you use the contents of Buf directly?

  • @samimsk8377
    @samimsk8377 4 ปีที่แล้ว

    Sir, Thank you very much for the useful video :)

  • @محمدرضارادپور-و5س
    @محمدرضارادپور-و5س 3 ปีที่แล้ว +1

    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?

    • @さい-j8e
      @さい-j8e 3 ปีที่แล้ว

      I ran into the same problem. Do you have any idea now?

    • @panteral6179
      @panteral6179 10 หลายเดือนก่อน

      did You resolved that issue?@@さい-j8e

    • @panteral6179
      @panteral6179 10 หลายเดือนก่อน

      did You resolved that issue?

    • @wendan5280
      @wendan5280 7 หลายเดือนก่อน

      @@panteral6179 the same problem)

  • @LiliaTroudi
    @LiliaTroudi ปีที่แล้ว

    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

    • @ControllersTech
      @ControllersTech  ปีที่แล้ว +1

      As much as i tested, it works with all the baud rates. So you can set any baud rate im hecules and it should work

  • @ferdinvivian9336
    @ferdinvivian9336 ปีที่แล้ว

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

  • @DerexArchives
    @DerexArchives ปีที่แล้ว

    I get an error that #includes (usb content) didnt work; any help? Thought libraries should all be imported by now

  • @ertugrulkarakulak369
    @ertugrulkarakulak369 3 ปีที่แล้ว

    Thank you, very helpful video.

  • @SanelKeys
    @SanelKeys 4 ปีที่แล้ว

    Thank you very much for useful video!

  • @lonny_breaux
    @lonny_breaux ปีที่แล้ว +1

    you are master!!!!!😍

  • @knobeat-knb
    @knobeat-knb 3 ปีที่แล้ว

    Thanks for the content!

  • @gunterotte
    @gunterotte 4 ปีที่แล้ว +1

    How fast can you send such data to the PC? So what is the virtual baud rate? I'm using the Teensy 4.0 for a similar function, and there it is operating at full USB 2.0 speed. I wonder if ST32 can achieve the same. The reason why I ask is that I want to output debug code to the PC in time critical code, and anything lower than 2MBaud is slowing down the code too much to operate.
    Thanks!

  • @Hhtfvhrcbgrejkkjhffvbhb
    @Hhtfvhrcbgrejkkjhffvbhb 6 หลายเดือนก่อน

    Many time try but not worj😢😢😢
    Any easy link available?

  • @gabrielfienco2531
    @gabrielfienco2531 3 ปีที่แล้ว

    You gave me a great idea with this video, just one question any language to built a simple custom app and use usb ??

  • @kampkrieger
    @kampkrieger 2 ปีที่แล้ว

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

  • @Gkvhkbt
    @Gkvhkbt 4 ปีที่แล้ว +1

    Very good.
    Can you show sigma delta ADC for 16-bit measurement?

  • @HadasBen-amram
    @HadasBen-amram 2 หลายเดือนก่อน

    great video! for some reason the comport not recognized on my laptop, Unknown USB Device (Device Descriptor Failed). I use NUCLEO-F413ZH. according to it's data sheet configuration (jumper and other connections) all set to use the USB dedicated connector. any idea?

  • @Якстатинепонимаюкак
    @Якстатинепонимаюкак 2 ปีที่แล้ว

    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

  • @PrasannaRoutray97
    @PrasannaRoutray97 3 ปีที่แล้ว

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

    • @ControllersTech
      @ControllersTech  3 ปีที่แล้ว

      Whatever you want to send You need to send as characters.

    • @therealspixycat
      @therealspixycat 2 ปีที่แล้ว

      @@ControllersTech I receive just a single char on Windows 11 Putty. It looks like the wrong baudrate setting but the baudrate is not applicable/relevant for a virtual com port. Double checked the clock settings and they are identical. Any suggestion?

  • @manuelbfhaeschbacher7942
    @manuelbfhaeschbacher7942 3 ปีที่แล้ว

    Great video. What would be the way to use printf over your USB-solution?

    • @ControllersTech
      @ControllersTech  3 ปีที่แล้ว

      Just create some function like print ()
      And inside it send the data like we did in the main function

  • @sinha....
    @sinha.... ปีที่แล้ว

    I am using stm32l152c disco board
    And after connecting board to pc port no. is not visible.

    • @ControllersTech
      @ControllersTech  ปีที่แล้ว

      It doesn't work for ST link USB ports. Connect to another USB port (user USB) if available.

  • @nupuravartak8211
    @nupuravartak8211 3 ปีที่แล้ว

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

  • @mostafakh5075
    @mostafakh5075 4 ปีที่แล้ว

    thanks sir, is that possible to tell us more about c programming like what you did in this video? it would helps a lot

    • @ControllersTech
      @ControllersTech  4 ปีที่แล้ว +6

      What c programming ? I merely used 1 function that was available by default. And i explained that too

  • @LaboussoleNano
    @LaboussoleNano 2 หลายเดือนก่อน

    hello i have followed all the step in the tutorial, but i can't manage to get the data on hercule nothing appear. What can be the issue
    Thanks

    • @ControllersTech
      @ControllersTech  2 หลายเดือนก่อน

      Probably the usb cable does not support data transfer.
      Which board are you using anyway ?

    • @LaboussoleNano
      @LaboussoleNano 2 หลายเดือนก่อน

      @ControllersTech thanks for answering I am using stm32F407 discovery board,
      I will change cable and see if it's working.

    • @LaboussoleNano
      @LaboussoleNano 2 หลายเดือนก่อน

      @ControllersTech thanks for answering, I am using stm32F407 discovery board.
      I've used another cable but it's still not working.

    • @ControllersTech
      @ControllersTech  2 หลายเดือนก่อน

      1. The video title says f103c8. Although you can use the same idea for other custom boards as well (like blackpill), but not for nucleo and discovery boards.
      2. Nucleo and Discovery boards comes with inbuilt ST Link, which can also be used as virtual com port for the UART communication. So you don't really need USB mode for it to communicate directly with the computer. Check the UART series, I have explained it in the first or second video I guess.
      3. If you want to use USB mode so badly, you can sill follow the video procedure. But you need to connect the USB to the user USB port, not the ST Link. It is generally avaialble at the bottom of your Discovery/Nucleo boards.

    • @LaboussoleNano
      @LaboussoleNano 2 หลายเดือนก่อน

      @@ControllersTech Thanks for answering.
      i wanted to be able to use the usb port on my STM32 DISC because I want to connect it to an instrument and communicate with it.
      My computer doesn't recongnise the STM32 USB port even the Bluepill USB port.
      -I checked the cable by connecting my phone and my phone was detected to send and receibve data (so it's not my cable)
      Best regards

  • @huutung149
    @huutung149 2 ปีที่แล้ว

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

  • @industrialautomation1992
    @industrialautomation1992 ปีที่แล้ว

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

    • @ControllersTech
      @ControllersTech  ปีที่แล้ว

      It won’t work with stlink usb. You need to connect another usb port.
      And why bother with this ? Nucleo boards have uart connected to the stlink. You can simply use uart2 to send and receive data to computer, without using any additional hardware.

  • @mirkacb
    @mirkacb 2 ปีที่แล้ว

    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!

  • @shubhamsr4675
    @shubhamsr4675 2 ปีที่แล้ว

    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 ?

    • @panteral6179
      @panteral6179 10 หลายเดือนก่อน

      did You resolved that issue?

  • @brendanhayes-oberst1398
    @brendanhayes-oberst1398 3 ปีที่แล้ว

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

    • @ControllersTech
      @ControllersTech  3 ปีที่แล้ว +1

      It's bluepill... Like the title says

  • @HazimEng
    @HazimEng 3 ปีที่แล้ว

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

    • @ControllersTech
      @ControllersTech  3 ปีที่แล้ว

      Make sure the usb cable supports data transfer.. some cables are only made for charging

    • @LittleEthanAdventures
      @LittleEthanAdventures 3 ปีที่แล้ว

      @@ControllersTech Hy i too have the same issue.. Any ideas ..i have done everything what you said....

  • @thomasperri3294
    @thomasperri3294 3 ปีที่แล้ว

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

  • @usmanhaider4653
    @usmanhaider4653 2 ปีที่แล้ว

    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.

    • @RobertLugg
      @RobertLugg 2 ปีที่แล้ว

      Did you indeed change the C code shown? It has a hard code value of 64 I think.

  • @mayssemnasri5945
    @mayssemnasri5945 ปีที่แล้ว

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

    • @ControllersTech
      @ControllersTech  ปีที่แล้ว

      You need to solder the user usb on that board.
      The default usb you might be using is for the ST Link, and it can't be used as usb host or device.

  • @rushikeshkumawat1361
    @rushikeshkumawat1361 2 ปีที่แล้ว

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

    • @ControllersTech
      @ControllersTech  2 ปีที่แล้ว +1

      If you are just getting started, i would advise that you get a STLink or get a nucleo or discovery board, they have st link built in.
      There are methods where you can upload the code to the bluepill without ST link. But you need to reprogram the bootloader for that. You can search about it.. I personally haven't done it yet.

    • @rushikeshkumawat1361
      @rushikeshkumawat1361 2 ปีที่แล้ว

      @@ControllersTech OK sir. I will try to find and do the work.

  • @priyanshshankhdhar1910
    @priyanshshankhdhar1910 2 ปีที่แล้ว

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

    • @panteral6179
      @panteral6179 10 หลายเดือนก่อน

      did You resolved that issue?

  • @estebangabrielcabanillas7582
    @estebangabrielcabanillas7582 2 ปีที่แล้ว

    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!

    • @ControllersTech
      @ControllersTech  2 ปีที่แล้ว +1

      Yes.. watch the MPU series videos in cortex m7 playlist

  • @thecarlos407
    @thecarlos407 ปีที่แล้ว

    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

  • @NaveenkumarRamachandran-x8y
    @NaveenkumarRamachandran-x8y 10 หลายเดือนก่อน

    i have a doubt....can i transfer and receive file using this USB COM port method...i want to transfer 1KB files from pc to stm32 board, is there any possibility?

  • @franciscoreis8256
    @franciscoreis8256 3 ปีที่แล้ว

    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?

  • @dnyaneshvarsalve2984
    @dnyaneshvarsalve2984 3 ปีที่แล้ว

    (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.

    • @ControllersTech
      @ControllersTech  3 ปีที่แล้ว

      Can u give the full name. I tried it with l475vg and the USB_OTG_FS is not greyed out..
      From there you enable the host.. then the USB_HOST option will be available too

    • @dnyaneshvarsalve2984
      @dnyaneshvarsalve2984 2 ปีที่แล้ว

      @@ControllersTech I did it today, It was just a matter of different wording, It is working properly now. Thanks for reply

  • @mustafamertsevim5231
    @mustafamertsevim5231 3 ปีที่แล้ว

    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 ?

  • @Tommy-tx4dx
    @Tommy-tx4dx 2 ปีที่แล้ว

    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?

    • @ControllersTech
      @ControllersTech  2 ปีที่แล้ว +1

      You don't write cdc_receive_fs function, it will be called automatically when the data is received by the controller.
      Len is the number of bytes received. In the video i am using memcpy function inside the cdc_receive to copy the received data into the desired buffer. The length of the "data to copy" using the memcpy function will be the Len parameter, as that's the total data we are receiving.

    • @Tommy-tx4dx
      @Tommy-tx4dx 2 ปีที่แล้ว

      @@ControllersTech thank you!

  • @fseeletronicos
    @fseeletronicos 3 ปีที่แล้ว

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

    • @ControllersTech
      @ControllersTech  3 ปีที่แล้ว

      Which board ?

    • @fseeletronicos
      @fseeletronicos 3 ปีที่แล้ว

      @@ControllersTech Hi. I am using ST32F013C8T6 Blue Pill.

    • @ControllersTech
      @ControllersTech  3 ปีที่แล้ว

      Make sure the usb cable do support the data transfer.. cheaper cables are only build for charging

    • @fseeletronicos
      @fseeletronicos 3 ปีที่แล้ว

      @@ControllersTech It does support. I am using Windows 10 and the St-link is being recognized but COM port.

    • @ControllersTech
      @ControllersTech  3 ปีที่แล้ว

      You have to run the code. Then connect the USB.. now check the device manager

  • @merveozdas1193
    @merveozdas1193 2 ปีที่แล้ว

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

  • @levettp
    @levettp 2 หลายเดือนก่อน

    Win10 not recognize device. Any advice?

    • @ControllersTech
      @ControllersTech  2 หลายเดือนก่อน +1

      Run the program first then connect the cable. Also make sure the cable supports data transfer.

  • @brendanhayes-oberst1398
    @brendanhayes-oberst1398 3 ปีที่แล้ว

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

    • @ControllersTech
      @ControllersTech  3 ปีที่แล้ว +1

      Well you have to build an application for the computer to do so. You can use uart to receive data from STM and save that data to the file on your computer

  • @ajithanandhan7009
    @ajithanandhan7009 ปีที่แล้ว

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

    • @ControllersTech
      @ControllersTech  ปีที่แล้ว

      of course you can.. but it's going to be very complicated.

  • @saurabhjha5401
    @saurabhjha5401 4 ปีที่แล้ว

    How to modify code if we want to send any sensor data in real time cause there I can't make any pointer

    • @ControllersTech
      @ControllersTech  4 ปีที่แล้ว

      Instead of "hello world", send your data..

  • @21ece028mariyappan.r
    @21ece028mariyappan.r 4 หลายเดือนก่อน

    Can I make it on h563zi

  • @skuula
    @skuula 3 ปีที่แล้ว

    Very nice! Although Im confused about the conversion to uint8_t to match a size_t. I think size_t is uint32_t or something there about.

    • @Gabu_
      @Gabu_ 2 ปีที่แล้ว

      Your comment is already somewhat old, but indeed size_t is "size_type", which expands to "long unsigned int". Having said that, the function was dealing with char type, therefore uint8_t.

    • @GIANGNGUYEN-s3w
      @GIANGNGUYEN-s3w ปีที่แล้ว

      @@Gabu_ his comment maybe was old, but u answer was helped me understand this problem. thank u much

    • @GIANGNGUYEN-s3w
      @GIANGNGUYEN-s3w ปีที่แล้ว

      but if i don't transfer this to uint8_t, can i using it?@@Gabu_

  • @berk26092
    @berk26092 2 ปีที่แล้ว

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

    • @ControllersTech
      @ControllersTech  2 ปีที่แล้ว

      The data can only be transmitted in ascii format. So convert the integer into string, then transfer, then convert back to integer

  • @julianerf4447
    @julianerf4447 4 ปีที่แล้ว

    How do you download the code in the microcontroller? I'm used to Keil Uvision compiler, but now in the CubeIDE I can't find this option. Do you have to always open the debugger to flash the code?
    Also, to use the debugger "live expression" to see the buffer, you had to connect the USB port and the STlink at the same time?

    • @ControllersTech
      @ControllersTech  4 ปีที่แล้ว +2

      To download the code, click the run button
      No you don't need to connect usb cable. Just connect st link that's enough.

    • @julianerf4447
      @julianerf4447 4 ปีที่แล้ว

      ​@@ControllersTech Thank you very much for answering. Your videos had helped me a lot!

    • @gustavovisentin1987
      @gustavovisentin1987 3 ปีที่แล้ว +1

      @@ControllersTech but if you want to send data from Hercules while you are debbuging, as you are doing in the video, you have to connect both St Link and USB cable. My problem is when I connect both, the USB com port "cannot be open". Hasn't it happened to you?

    • @さい-j8e
      @さい-j8e 3 ปีที่แล้ว

      @@gustavovisentin1987 I have the same problem. It's not working when connect both st-link and usb

  • @kinshuksrivastava7088
    @kinshuksrivastava7088 4 ปีที่แล้ว

    Tried transmitting simple "hello" string, didn't work. Nothing shows up on the monitor. transmitting data using mbed libraries works fine though. Any idea what might be the problem ?
    Device: STM32F446RE, OS: Ubuntu 20.04

    • @ControllersTech
      @ControllersTech  4 ปีที่แล้ว

      Read the @jacques comment from 1 week before...
      And what do you mean you can do it using mbed libraries ? Can u share that library.. maybe it could help through the situation

    • @kinshuksrivastava7088
      @kinshuksrivastava7088 4 ปีที่แล้ว

      @@ControllersTech oh, so I can't use the same usb port for USB data transfer which is also used STLINK ? I'm able to send and receive data using a single usb cable using mbed.h library (using mbed online compiler). Also while debugging the program (your tutorial), hcdc->Txstate is always zero so CDC_Transmit_FS() always returns usbd_busy. More over, it says can't access memory at some locations for both Tx and Rx buffer.

    • @ControllersTech
      @ControllersTech  4 ปีที่แล้ว

      Can u send the link of the library you are talking about..

    • @kinshuksrivastava7088
      @kinshuksrivastava7088 4 ปีที่แล้ว

      @@ControllersTech github.com/ARMmbed/mbed-os/blob/master/mbed.h --> mbed online compiler provides mbed library according to the target device selected.

    • @ControllersTech
      @ControllersTech  4 ปีที่แล้ว

      I know what mbed is.. you are just pointing me to "what mbed os is"
      You mentioned earlier that you can use usb functions to send data to the pc. I am asking the library for those usb functions...
      If you don't understand this, just check the device manager in your computer and see if the board is recognised as a serial device or a virtual com port..

  • @cristianaguada8101
    @cristianaguada8101 3 ปีที่แล้ว

    Hi, i cant view "buffer" y Expression. What could i do to show it? thanks! Sorry for my English, im Argentian

    • @ControllersTech
      @ControllersTech  3 ปีที่แล้ว

      You have to add it there.
      Add it in the live expression

    • @cristianaguada8101
      @cristianaguada8101 3 ปีที่แล้ว

      @@ControllersTech for do that i need to conect the usb-programer, but then, transmission stops working. Computer stops receiving the recurrent message and buffer[] doesnt receive what i send. Do you know what could be wrong? Thanks

    • @ControllersTech
      @ControllersTech  3 ปีที่แล้ว +1

      You saw i did it in the video right..
      Just follow what i did

    • @さい-j8e
      @さい-j8e 3 ปีที่แล้ว

      @@cristianaguada8101 same problem here. Have you solved the problem?

    • @cristianaguada8101
      @cristianaguada8101 3 ปีที่แล้ว

      @@さい-j8e Hi, yep. I bought a new bluepill. My first STM chip was a fake copy.

  • @reddyvvr2481
    @reddyvvr2481 หลายเดือนก่อน

    thanks very much nice explanation to me(Old electronics/ New VLSI ) engineer
    --Ramana Reddy V V
    Rtd ISRO

  • @jacquesmonnier7051
    @jacquesmonnier7051 4 ปีที่แล้ว

    Thank you for all your content; It really helps. I m trying to do the same thing but on a Nucleo L053R8. Im following the same steps but it is not working.

    • @ControllersTech
      @ControllersTech  4 ปีที่แล้ว

      Do your board have the USB ?
      Nucleo boards comes with only 1 USB port by default, and that is used for st link and uart..
      You need to attach another USB to your board..

    • @jacquesmonnier7051
      @jacquesmonnier7051 4 ปีที่แล้ว

      @@ControllersTech Hello Thanks for the reply. I thought I could use the USB with the STLINK (I am still a beginner in STM32 field). Everything works now ! (I had also a problem with my current cable, It could not send data).

  • @BoiledEggFace
    @BoiledEggFace 3 ปีที่แล้ว

    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

    • @ControllersTech
      @ControllersTech  3 ปีที่แล้ว

      Nucleo have 1 shared crystal between the stlink and the mcu. So i don't think it's the crystal

    • @BoiledEggFace
      @BoiledEggFace 3 ปีที่แล้ว

      @@ControllersTech Thanks so much for getting back to me! It's the NUCLEO-F411RE which appears to have a separate place for it? It really makes no sense as to why it did work in the past. To be sure if there is no HSE, the 48MHz can't be generated and so the USB device won't work as expected?

    • @ControllersTech
      @ControllersTech  3 ปีที่แล้ว

      This particular project will never work with nucleo f411. It requires user usb slot and f411 only have stlink usb.

    • @BoiledEggFace
      @BoiledEggFace 3 ปีที่แล้ว

      @@ControllersTech I have just used the IO header (CN10) as PA11/PA12 are available at that header. I have then connected the USB D+/D- to those two points. Thanks again

    • @ControllersTech
      @ControllersTech  3 ปีที่แล้ว

      I don't know why are u going through all this trouble when u can simply use the uart2, which is routed through the stlink usb itself, but it's upto you anyway.
      I don't know why it's not working but i would suggest that you try a different usb once. I am sure it's not the clocks.

  • @akhilkaki6480
    @akhilkaki6480 4 ปีที่แล้ว

    can you please make a video on OTA for STM32

  • @selim-f1u
    @selim-f1u 2 หลายเดือนก่อน

    Hi , nice video but I have an issue. I cant debug and use hercules at the same time. Is there anyone knows how to solve?

    • @ControllersTech
      @ControllersTech  2 หลายเดือนก่อน

      You need to establish the connection after running the debugger.

    • @selim-f1u
      @selim-f1u 2 หลายเดือนก่อน

      @ControllersTech Thank you for your answer. But herculus cant open the serial with the linked com port when it is in debug mode.

  • @PowerAlejandroLegion
    @PowerAlejandroLegion 3 ปีที่แล้ว

    Thank you!!!

  • @itayjc1
    @itayjc1 3 ปีที่แล้ว

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

    • @ControllersTech
      @ControllersTech  3 ปีที่แล้ว

      Yes all of them can work with internal clocks.
      During the cubemx setup, instead of using HSE (High speed external) clock, just use HSI (internal).

    • @itayjc1
      @itayjc1 3 ปีที่แล้ว

      @@ControllersTech
      When I try to use the HSI, I get an error saying "cannot find a solution for some constraints". I am using STM32446RE. Should I maybe buy a different modle to make this work?

    • @ControllersTech
      @ControllersTech  3 ปีที่แล้ว

      1. You can use external crystal for 446RE. It will use the one for the ST link on the top.
      2. If using the internal clock, the system clock will be limited to certain frequencies, so you can't use whatever you want in this case.
      3. This video won't work with 446RE nucleo, unless you have attached one additional USB port ( you can see it below the empty crystal, "user usb").
      The USB that you use to load program is the ST-Link, it's not the user port.

  • @anghao7050
    @anghao7050 3 ปีที่แล้ว

    how to download STM32 Virtual COM port driver for Win10. I don't see it in the st.com ( only Win 7-8) :( Help me.
    Thanks!

    • @ControllersTech
      @ControllersTech  3 ปีที่แล้ว +1

      Windows 10 don't need driver

    • @anghao7050
      @anghao7050 3 ปีที่แล้ว

      @@ControllersTech thank you.

  • @ranco801
    @ranco801 ปีที่แล้ว

    Thx! ps: USB interrupt must be enabled

  • @incxxxx
    @incxxxx 7 หลายเดือนก่อน

    How to do it for nucleo F767ZI ???

    • @ControllersTech
      @ControllersTech  7 หลายเดือนก่อน

      Why would you want to use it in a nucleo board ? You can simply use the uart2 to communicate with the computer.

    • @incxxxx
      @incxxxx 7 หลายเดือนก่อน

      @@ControllersTech You could also use uart in case F103C8 but you did not. Besides I want to do it without uart in similar way as you did but I encontered problems.

    • @ControllersTech
      @ControllersTech  7 หลายเดือนก่อน

      No you can't use uart in 103c8, if you do, you need to connect an external hardware to convert the uart data to usb. This was the main reason for the video.
      The nucleo boards has virtual com port which allows the uart data to display on the serial monitor without the use of an external hardware.
      Anyway if you insist on using it, you need to connect the usb to the "user usb" port, not the st link. Also make sure that the usb supports data transfer.

    • @incxxxx
      @incxxxx 7 หลายเดือนก่อน

      @@ControllersTech USB_DEVICE and USB_HOST in MXCube are disabled. I did not find the information how to enable them.

  • @Andryu_
    @Andryu_ 3 ปีที่แล้ว

    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?

    • @ControllersTech
      @ControllersTech  3 ปีที่แล้ว

      Convert to string and send..

    • @Andryu_
      @Andryu_ 3 ปีที่แล้ว

      @@ControllersTech I'm sorry I didn't get it. I have for example int p = 1, how can I convert it to string? Thanks a lot, I'm sorry

    • @ControllersTech
      @ControllersTech  3 ปีที่แล้ว +1

      Use sprintf. It's very basic c function.. Google it if you don't know what it is..

    • @Andryu_
      @Andryu_ 3 ปีที่แล้ว

      @@ControllersTech alright I found it and did it, you are very kind sir, thanks a lot you saved me!

  • @p.rivethead7841
    @p.rivethead7841 5 หลายเดือนก่อน

    Unknowing usb device ... what can be wrong ?

    • @p.rivethead7841
      @p.rivethead7841 5 หลายเดือนก่อน

      in my case was problem with controller , is all work, after i changed it on other )

  • @alibarakat1056
    @alibarakat1056 4 ปีที่แล้ว

    Do you upload the code via st link v2 tool ?

  • @goodwill7643
    @goodwill7643 3 ปีที่แล้ว

    thank you :)

  • @francosoto4037
    @francosoto4037 3 ปีที่แล้ว

    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

    • @panteral6179
      @panteral6179 10 หลายเดือนก่อน

      did You resolved that issue?

  • @wendan5280
    @wendan5280 7 หลายเดือนก่อน

    Someone met an Error: L6218E?

  • @santojos5580
    @santojos5580 4 ปีที่แล้ว

    Tutorial 👍

  • @eslamaboutaleb3482
    @eslamaboutaleb3482 4 ปีที่แล้ว +1

    Link of your background also please 😂❤️

    • @ControllersTech
      @ControllersTech  4 ปีที่แล้ว +1

      www.wallpapertip.com/wpic/iTibRxi_mandalorian-wallpaper/

  • @jiraphonsasomsap1808
    @jiraphonsasomsap1808 2 ปีที่แล้ว

    thx

  • @irinejose
    @irinejose 2 ปีที่แล้ว

    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.

    • @ControllersTech
      @ControllersTech  2 ปีที่แล้ว

      you can use putty to send the data also. If it's not convenient, look for cutecom.

  • @cryptobee04
    @cryptobee04 4 ปีที่แล้ว

    Mandalorian 😄👍🏻👍🏻

  • @bsbharat0705
    @bsbharat0705 4 ปีที่แล้ว

    Nice work👍👍

  • @Andr_e_y
    @Andr_e_y 2 ปีที่แล้ว

    best

  • @lilymorgan7932
    @lilymorgan7932 4 ปีที่แล้ว

    Really nice 👌 😍💋 💝💖❤️