2019-10-15 06:27 PM
haven't run up USB Host before. is there no examples for the H series ?
attached the touch screen,
Using the Cube
C:\Users\DAVE\STM32Cube\Repository\STM32Cube_FW_H7_V1.5.0
I am getting to Application Start, just not sure what to do at that point.
from the foreground : I can read the PID 1, VID 222A. which is the ILITEK USB touch chip
how do I satisfy the initialization sequence ?
How to see the "Touch" bytes coming in ?
sprintf(string, "PID: %xh VID: %xh \n", hUsbHostFS.device.DevDesc.idProduct, hUsbHostFS.device.DevDesc.idVendor);
printTW(console , string);
static void USBH_UserProcess2 (USBH_HandleTypeDef *phost, uint8_t id)
{
/* USER CODE BEGIN CALL_BACK_21 */
switch(id)
{
case HOST_USER_SELECT_CONFIGURATION:
break;
case HOST_USER_DISCONNECTION:
Appli_state = APPLICATION_DISCONNECT;
break;
case HOST_USER_CLASS_ACTIVE:
Appli_state = APPLICATION_READY;
break;
case HOST_USER_CONNECTION:
Appli_state = APPLICATION_START;
printTW(console, "HID 2 Application has started");
break;
default:
break;
}
2019-10-16 03:03 PM
can someone point me to a working example or document ?
2019-10-16 05:21 PM
Here are the host examples:
... \STM32Cube_FW_H7_V1.5.0\Projects\STM32H743I-EVAL\Applications\USB_Host
> I can read the PID 1, VID 222A. which is the ILITEK USB touch chip
This is very good. Your host provides power to the device and it enumerates.
Now, tweak the "HID protocol" part. You'll want to change it and make your own.
Study how the "state machine" of HID examples works, and try to read the data.
If you know the size of the data packets of the device, ensure that you read that much.
Else, read its HID report descriptor and find the report size.
-- pa
2019-10-16 05:33 PM
You're a bit beyond the boundary of the park here...
There are class drivers for HID and some examples
STM32Cube_FW_H7_V1.5.0\Projects\STM32H747I-EVAL\Applications\USB_Host\HID_Standalone
STM32Cube_FW_H7_V1.5.0\Projects\STM32H743I-EVAL\Applications\USB_Host\HID_Standalone
perhaps you can instrument the snot out of them, or morph one of the mouse, keyboard, parser classes.
Linux drivers might provide some insight into specific hardware.