Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
amanning
Level 4
Level 4
25 replies posted 10 questions asked 25 sign-ins

Is there an example program for the XMC using the USB in Host Mode? There is nothing shown in the list of µVision packs.

I am using the XMC4500, but an example for any of the XMC family would be helpful.

My aim is to connect a barcode scanner or keyboard to the XMC.

0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.
sujatapatil
Moderator
Moderator
Moderator
10 likes received 100 sign-ins 25 solutions authored

Hi ,

There are two ways you can use USB host driver 

1>You can add USB host module using USBD_VCOM in DAVE, this will add manifest for both host side and device side  and USB driver will be placed in Dave generated code . Screenshot is attached. 

2> please use one of the code example link provided above . USBD will be imported as library in this example . For your request where you want to use HID devices please use  USBD_HID_XMC47 example code . This will have usb host driver and  HID class driver .

 XMC4500 USB can run in Low-speed host mode : Yes. XMC4500 USB is 2.0 compliant and backward compatible. 

Please let me know if it help you or you need further detail.

Thanks

Sujata

View solution in original post

0 Likes
5 Replies
sujatapatil
Moderator
Moderator
Moderator
10 likes received 100 sign-ins 25 solutions authored

Hi ,

You can find example code USB host and HID class at below location,

https://www.infineon.com/cms/en/product/promopages/aim-mc/dave_downloads.html

Thanks

Sujata

0 Likes
amanning
Level 4
Level 4
25 replies posted 10 questions asked 25 sign-ins

The link you gave has a lot of examples, but I could not find a USB Host example for HID.

I want to connect a barcode scanner or keyboard to my XMC4500, so it needs to run as a HID Host.

0 Likes
sujatapatil
Moderator
Moderator
Moderator
10 likes received 100 sign-ins 25 solutions authored

Hi 

Please find example code  USBD_HID_XMC47 at location https://www.infineon.com/cms/en/product/promopages/aim-mc/dave_downloads.htmlhttps://www.infineon.com/cms/en/product/promopages/aim-mc/dave_downloads.htmlfor HID class implementation . 

Please read Getting started Guide in downloaded folder for more information.

Thanks

Sujata

0 Likes
amanning
Level 4
Level 4
25 replies posted 10 questions asked 25 sign-ins

Dave does not seem to have a USB Host module. I can only find USB Device.

Does anyone know if the XMC4500 USB can run in Low-speed host mode?

0 Likes
lock attach
Attachments are accessible only for community members.
sujatapatil
Moderator
Moderator
Moderator
10 likes received 100 sign-ins 25 solutions authored

Hi ,

There are two ways you can use USB host driver 

1>You can add USB host module using USBD_VCOM in DAVE, this will add manifest for both host side and device side  and USB driver will be placed in Dave generated code . Screenshot is attached. 

2> please use one of the code example link provided above . USBD will be imported as library in this example . For your request where you want to use HID devices please use  USBD_HID_XMC47 example code . This will have usb host driver and  HID class driver .

 XMC4500 USB can run in Low-speed host mode : Yes. XMC4500 USB is 2.0 compliant and backward compatible. 

Please let me know if it help you or you need further detail.

Thanks

Sujata

0 Likes