STM32 USB training - 09.7 USB HID device custom device lab

Поделиться
HTML-код
  • Опубликовано: 4 ноя 2024

Комментарии • 45

  • @yosefgreen4187
    @yosefgreen4187 2 года назад +6

    Thank you for the video.
    It will be nice if you could make a tutorial on how to create the Report Descriptor by using the existing tools (like the one made by TI for SMP430)
    Here are some bookmarks of this training:
    2:57 use 48MHz clock for the USB.
    4:18 Increase HID report size in usbd_conf.h
    4:53 In usbd_customhid.h increase endpoint size and change USB customid structure (default structure message size is limited to 2)
    5:48 fixing wrong change from before
    5:53 #define USBD_CUSTOM_HID_REPORT_DESC_SIZE 33
    6:15 Change the (* OutEvent) from 2 bytes to a buffer pointer.
    6:27 Pass a pointer for OutEvent
    7:14 change of bInterval value to get faster response from the device
    7:51 change out and in function that are used
    8:04 USBD_CUSTOM_HID_DataOut
    8:25 OutEvent(hhid->Report_buf)
    8:34 same for: HID_EP0_RxReady()
    8:57 Change usbd_custom_hid_if.c
    9:17 add global buffer[64]
    10:07 Modify CUSTOM_HID_OutEvent_FS function declaration
    10:57 here callback upon receiving data from host
    11:07 add echo
    11:36 by using USBD_CUSTOM_HID_SendReport()
    12:40 "a collection of numbers without any meaning..."
    13:21 "magic" numbers that used for this example
    13:34 go to USB specification: usb.org/document-library/hid-usage-tables-122
    14:50 see the it in device manager
    15:00 run the HID_terminal.exe
    15:11 at: \Tools and files\HID_terminal\HID_terminal\bin\Debug\HID_terminal.exe

    • @TheShorterboy
      @TheShorterboy Год назад +2

      Lookup hidrd-convert just don't use the short code versions on microsoft as it doesn't pass them correctly, you can define an XML or code thing worked great for me doing a joystick keyboard inetrface thing

  • @tomaszwota1465
    @tomaszwota1465 3 года назад +4

    I wonder how it came to be that you have variables named _SIZE and _SIZ for "size". There's a lot of examples of inconsistent naming around.

  • @cancian123
    @cancian123 3 года назад +1

    I love you guys from ST. Always making things easier! (L)(L)

    • @stmicroelectronics
      @stmicroelectronics  3 года назад

      Thanks for watching!

    • @maxtobias6034
      @maxtobias6034 3 года назад

      you probably dont care at all but does anyone know a trick to get back into an Instagram account??
      I was dumb lost the password. I appreciate any assistance you can offer me!

    • @jabariterrence4539
      @jabariterrence4539 3 года назад

      @Max Tobias instablaster :)

    • @maxtobias6034
      @maxtobias6034 3 года назад

      @Jabari Terrence i really appreciate your reply. I got to the site on google and im trying it out atm.
      Takes quite some time so I will reply here later with my results.

    • @maxtobias6034
      @maxtobias6034 3 года назад

      @Jabari Terrence it did the trick and I now got access to my account again. I'm so happy!
      Thank you so much, you really help me out !

  • @TheShorterboy
    @TheShorterboy Год назад

    Yeah all the hid stuff is defined backwards so it requires you to know magic numbers for lengths if you want to change anything and the documentation is also woeful.

  • @ВикторГиль-ф2ф
    @ВикторГиль-ф2ф 4 года назад +2

    I tested your example report descriptor with STM32F072C8T6. On windows 10 Device Manager/Human Interface Devices/USB Input Device/ Events tab I see following error "Device USB\VID_0483&PID_5750\2079365D4234 had a problem starting." and HidD_GetInputReport function does not work with error 31. Do you ever test your examples on Windows 10 ? (by the way, it is bad to change autogenerated code)

    • @chih-weiwu251
      @chih-weiwu251 3 года назад

      I also occur fail on win10

    • @adbo1108
      @adbo1108 3 года назад +1

      @@chih-weiwu251 I found the cause, the video at 4:27 , in usbd_conf.h , I modify #define USBD_CUSTOMHID_OUTREPORT_BUF_SIZE 64 ,
      the course slide I download from ST web, lose this define

  • @Andreasonline3
    @Andreasonline3 5 лет назад +2

    tried for stmf4 disc and it's not working, any ideas ?

  • @masterkit9517
    @masterkit9517 3 года назад +1

    I need MIDI device, its possible on STM32 ? Please give lesson for MIDI device on f103c8t6

    • @stmicroelectronics
      @stmicroelectronics  3 года назад +1

      Hi there, thanks for your question - may we point you towards our community.st.com, where you will find a team of people who can answer you directly ?

    • @masterkit9517
      @masterkit9517 3 года назад +1

      @@stmicroelectronics ok

  • @emirhanalkan8993
    @emirhanalkan8993 5 лет назад +2

    how to change device description in device manager ?

  • @ederv8turboify
    @ederv8turboify 4 года назад

    thank you very much for the video lesson

  • @mateusfabricio9137
    @mateusfabricio9137 2 года назад +3

    Training materials: drive.google.com/file/d/1sjU9iNvh_khDZHDM9Qau03PGKwMd4u7U/view

    • @mateusfabricio9137
      @mateusfabricio9137 2 года назад

      /* USER CODE BEGIN 0 */
      0x06, 0x00, 0xff, //Usage Page(Undefined )
      0x09, 0x01, // USAGE (Undefined)
      0xa1, 0x01, // COLLECTION (Application)
      0x15, 0x00, // LOGICAL_MINIMUM (0)
      0x26, 0xff, 0x00, // LOGICAL_MAXIMUM (255)
      0x75, 0x08, // REPORT_SIZE (8)
      0x95, 0x40, // REPORT_COUNT (64)
      0x09, 0x01, // USAGE (Undefined)
      0x81, 0x02, // INPUT (Data,Var,Abs)
      0x95, 0x40, // REPORT_COUNT (64)
      0x09, 0x01, // USAGE (Undefined)
      0x91, 0x02, // OUTPUT (Data,Var,Abs)
      0x95, 0x01, // REPORT_COUNT (1)
      0x09, 0x01, // USAGE (Undefined)
      0xb1, 0x02, // FEATURE (Data,Var,Abs)
      /* USER CODE END 0 */
      0xC0 /* END_COLLECTION */

  • @botak333
    @botak333 3 года назад

    Hi sir, it is posible to used for steering wheel sir??

    • @stmicroelectronics
      @stmicroelectronics  3 года назад

      Hi there, thanks for your question - may we point you towards our community.st.com, where you will find a team of people who can answer you directly ?

    • @botak333
      @botak333 3 года назад

      @@stmicroelectronics okee thank you sir🙏🙏🙏

  • @Rtek-zv5lr
    @Rtek-zv5lr 3 года назад

    Using a flat headset will greatly improve your audio. I stopped listening to the notebook speakers and started listening to cheap flat headphones, the audio was much cleaner.

  • @nishantbansal82
    @nishantbansal82 3 года назад

    @7:30 You changed host to device request time as 1ms. What effect it will have?

    • @stmicroelectronics
      @stmicroelectronics  3 года назад

      Hi there, thanks for your question - may we point you towards our community.st.com, where you will find a team of people who can answer you directly ?

    • @zekisolak4141
      @zekisolak4141 3 года назад

      It will directly effect how many times your host ask for data from you. if you reduce the time, you can send more packages per second to your host

  • @utsavsuha
    @utsavsuha 2 года назад

    The example works in its original state and not allowing any modification. i want to send 1 from HID terminal and wants that the stm sends "Hello". This is not working. Why?
    memcpy(buffer,state,0x40);
    if(state[0] == '1')
    {
    Start = 1;
    }
    else if(state[0] == '0')
    {
    Stop = 1;
    }
    else if(state[0] == 'c')
    {
    Health = 1;
    }
    and in the main function
    if(Start == 1)
    {
    HAL_Delay(500);
    Start = 0;
    memset(buffer,0x00,0x40);
    strcpy(buffer,"Hello");
    USBD_CUSTOM_HID_SendReport(&hUsbDeviceFS, buffer, 0x40);
    }
    else if(Stop == 1)
    {
    HAL_Delay(500);
    Stop = 0;
    memset(buffer,0x00,0x40);
    strcpy(buffer,"Stop");
    USBD_CUSTOM_HID_SendReport(&hUsbDeviceFS, buffer, 0x40);
    }
    else if(Health == 1)
    {
    HAL_Delay(500);
    Health = 0;
    memset(buffer,0x00,0x40);
    strcpy(buffer,"Fine");
    USBD_CUSTOM_HID_SendReport(&hUsbDeviceFS, buffer, 0x40);
    }

  • @PungKitchen
    @PungKitchen 3 года назад

    Hi si HID posible to make steering wheel?

    • @stmicroelectronics
      @stmicroelectronics  3 года назад

      Hi there, thanks for your question - may we point you towards our community.st.com, where you will find a team of people who can answer you directly ?

  • @utsavsuha
    @utsavsuha 2 года назад +1

    The HID terminal crash after every 3rd transaction.

  • @mamathav4580
    @mamathav4580 3 года назад

    Hi How to create our own custom class in stm32?

    • @stmicroelectronics
      @stmicroelectronics  3 года назад

      Hi there, thanks for your question - may we point you towards our community.st.com, where you will find a team of people who can answer you directly ?

  • @minnyatto
    @minnyatto 5 лет назад

    hello, I can not download zip file. google drive said it is not exist. Please help me ...

    • @stmicroelectronics
      @stmicroelectronics  5 лет назад

      Hello. I have checked and all seems to be working. I can see STM32_USB_training_Content.zip file within "Training materials" section on the landing page for this session.

  • @daviepadilla
    @daviepadilla 5 лет назад

    where can I download the windows HID example app?

    • @stmicroelectronics
      @stmicroelectronics  5 лет назад +1

      You can find all of the tools within "Training materials" zip file. Link to this file is present on the landing page for this session which is mentioned in the description of the video.