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
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
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!
@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.
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.
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 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
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.
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); }
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.
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.
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
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
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.
I love you guys from ST. Always making things easier! (L)(L)
Thanks for watching!
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!
@Max Tobias instablaster :)
@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.
@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 !
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.
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)
I also occur fail on win10
@@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
tried for stmf4 disc and it's not working, any ideas ?
I need MIDI device, its possible on STM32 ? Please give lesson for MIDI device on f103c8t6
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 ?
@@stmicroelectronics ok
how to change device description in device manager ?
thank you very much for the video lesson
Training materials: drive.google.com/file/d/1sjU9iNvh_khDZHDM9Qau03PGKwMd4u7U/view
/* 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 */
Hi sir, it is posible to used for steering wheel sir??
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 ?
@@stmicroelectronics okee thank you sir🙏🙏🙏
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.
@7:30 You changed host to device request time as 1ms. What effect it will have?
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 ?
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
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);
}
Hi si HID posible to make steering wheel?
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 ?
The HID terminal crash after every 3rd transaction.
Hi How to create our own custom class in stm32?
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 ?
hello, I can not download zip file. google drive said it is not exist. Please help me ...
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.
where can I download the windows HID example app?
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.