RT1062 User-Defined Class (0xFF) USB HOST Example

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

RT1062 User-Defined Class (0xFF) USB HOST Example

2,755 Views
kennethkong852
Contributor II

Hello Community!

I would like to learn how to implement a "User-defined" (or known as Vendor class per USB.org) Class 0xFF USB Host (bare metal) on the i.MX RT1062 MCU.

Our goal is to connect this with the "Device" which is another i.MX RT MCU that will potentially be running Zephyr RTOS.

As far as I know, there is currently no direct example project from the NXP SDK Builder site that would meet this need.

Can anyone please enlighten me or point me to such example?  If that does not exist, what is the best example project to use for adapting to this user-defined class host?

Thank you very much!

Labels (1)
Tags (2)
0 Kudos
Reply
5 Replies

2,681 Views
carstengroen
Senior Contributor II

@kennethkong852 ,

not sure if this can help you or not, I did this code and use it actively in a number 106x projects:

https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Working-Custom-USB-example-using-Bulk-transfer-i...

 

0 Kudos
Reply

2,655 Views
kennethkong852
Contributor II

Hi carstengroen,

Thank you for the references!

It seems that you were implementing Device on the 106x.

I am interested in implementing Host running on the 106x.

However, your work is super helpful in understanding from the Device end, which will help me develop that as well!

Your guide is much appreciated!

REGARDS,

Ken

0 Kudos
Reply

2,583 Views
Sam_Gao
NXP Employee
NXP Employee

You are correct that there is no direct example in the MCUXpresso SDK. However, the SDK provides a USB host stack and several standard class examples for reference.

The suitable starting point is one of the bare-metal HID host examples, such as host_hid_mouse_bm  or usb_host_hid_mouse_keyboard 

https://mcuxpresso.nxp.com/mcuxsdk/latest/html/examples/usb_examples/index.html 

0 Kudos
Reply

2,567 Views
kennethkong852
Contributor II

Hello @Sam_Gao ,

Thank you very much for your reference and suggestion.

How possible would it be for the engineering team to look into providing an exact example (MCUXpresso IDE) project that would serve as a good skeleton/template for implementing a User-defined Vendor class host for the RT106x?

Much appreciated!

Ken

0 Kudos
Reply

2,502 Views
Sam_Gao
NXP Employee
NXP Employee

Hi @kennethkong852 

Currently, there is no plan about the dedicated implementing for this example.

BTW, please refer to AN14169: How to Generate a User-Defined Class USB Device based on i.MX RT Chips.

https://www.nxp.com/docs/en/application-note/AN14169.pdf 

 

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2261526%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERT1062%20User-Defined%20Class%20(0xFF)%20USB%20HOST%20Example%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2261526%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%20Community!%3C%2FP%3E%3CP%3E%3CSTRONG%3EI%20would%20like%20to%20learn%20how%20to%20implement%20a%20%22User-defined%22%20(or%20known%20as%20Vendor%20class%20per%20%3CA%20href%3D%22https%3A%2F%2Fwww.usb.org%2Fdefined-class-codes%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3EUSB.org%3C%2FA%3E)%20Class%200xFF%20USB%20Host%20(bare%20metal)%20on%20the%20i.MX%20RT1062%20MCU.%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3EOur%20goal%20is%20to%20connect%20this%20with%20the%20%22Device%22%20which%20is%20another%20i.MX%20RT%20MCU%20that%20will%20potentially%20be%20running%20Zephyr%20RTOS.%3C%2FP%3E%3CP%3EAs%20far%20as%20I%20know%2C%20there%20is%20currently%20no%20direct%20example%20project%20from%20the%20NXP%20SDK%20Builder%20site%20that%20would%20meet%20this%20need.%3C%2FP%3E%3CP%3ECan%20anyone%20please%20enlighten%20me%20or%20point%20me%20to%20such%20example%3F%26nbsp%3B%20If%20that%20does%20not%20exist%2C%20what%20is%20the%20best%20example%20project%20to%20use%20for%20adapting%20to%20this%20user-defined%20class%20host%3F%3C%2FP%3E%3CP%3EThank%20you%20very%20much!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2261526%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3Ei.MXRT%20106x%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2262940%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20RT1062%20User-Defined%20Class%20(0xFF)%20USB%20HOST%20Example%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2262940%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F199889%22%20target%3D%22_blank%22%3E%40kennethkong852%3C%2FA%3E%26nbsp%3B%2C%3C%2FP%3E%3CP%3Enot%20sure%20if%20this%20can%20help%20you%20or%20not%2C%20I%20did%20this%20code%20and%20use%20it%20actively%20in%20a%20number%20106x%20projects%3A%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fi-MX-RT-Crossover-MCUs%2FWorking-Custom-USB-example-using-Bulk-transfer-incl-code%2Fm-p%2F1260056%23M13727%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fi-MX-RT-Crossover-MCUs%2FWorking-Custom-USB-example-using-Bulk-transfer-incl-code%2Fm-p%2F1260056%23M13727%3C%2FA%3E%3C%2FP%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2263156%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20RT1062%20User-Defined%20Class%20(0xFF)%20USB%20HOST%20Example%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2263156%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CSPAN%20class%3D%22%22%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F105884%22%20target%3D%22_self%22%3E%3CSPAN%20class%3D%22%22%3Ecarstengroen%3C%2FSPAN%3E%3C%2FA%3E%3C%2FSPAN%3E%2C%3C%2FP%3E%3CP%3EThank%20you%20for%20the%20references!%3C%2FP%3E%3CP%3EIt%20seems%20that%20you%20were%20implementing%20Device%20on%20the%20106x.%3C%2FP%3E%3CP%3EI%20am%20interested%20in%20implementing%20Host%20running%20on%20the%20106x.%3C%2FP%3E%3CP%3EHowever%2C%20your%20work%20is%20super%20helpful%20in%20understanding%20from%20the%20Device%20end%2C%20which%20will%20help%20me%20develop%20that%20as%20well!%3C%2FP%3E%3CP%3EYour%20guide%20is%20much%20appreciated!%3C%2FP%3E%3CP%3EREGARDS%2C%3C%2FP%3E%3CP%3EKen%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2265325%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20RT1062%20User-Defined%20Class%20(0xFF)%20USB%20HOST%20Example%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2265325%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F233161%22%20target%3D%22_blank%22%3E%40Sam_Gao%3C%2FA%3E%26nbsp%3B%2C%3C%2FP%3E%3CP%3EThank%20you%20very%20much%20for%20your%20reference%20and%20suggestion.%3C%2FP%3E%3CP%3EHow%20possible%20would%20it%20be%20for%20the%20engineering%20team%20to%20look%20into%20providing%20an%20exact%20example%20(MCUXpresso%20IDE)%20project%20that%20would%20serve%20as%20a%20good%20skeleton%2Ftemplate%20for%20implementing%20a%20User-defined%20Vendor%20class%20host%20for%20the%20RT106x%3F%3C%2FP%3E%3CP%3EMuch%20appreciated!%3C%2FP%3E%3CP%3EKen%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2264423%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20RT1062%20User-Defined%20Class%20(0xFF)%20USB%20HOST%20Example%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2264423%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%20class%3D%22%22%3EYou%20are%20correct%20that%20there%20is%20no%20direct%20example%20in%20the%20MCUXpresso%20SDK.%20However%2C%20the%20SDK%20provides%20a%20USB%20host%20stack%20and%20several%20standard%20class%20examples%20for%20reference.%3C%2FP%3E%0A%3CP%20class%3D%22%22%3EThe%20suitable%20starting%20point%20is%20one%20of%20the%20bare-metal%20HID%20host%20examples%2C%20such%20as%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CCODE%20class%3D%22%22%3Ehost_hid_mouse_bm%3C%2FCODE%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eor%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CCODE%20class%3D%22%22%3Eusb_host_hid_mouse_keyboard%3C%2FCODE%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fmcuxpresso.nxp.com%2Fmcuxsdk%2Flatest%2Fhtml%2Fexamples%2Fusb_examples%2Findex.html%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fmcuxpresso.nxp.com%2Fmcuxsdk%2Flatest%2Fhtml%2Fexamples%2Fusb_examples%2Findex.html%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2266660%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20RT1062%20User-Defined%20Class%20(0xFF)%20USB%20HOST%20Example%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2266660%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F199889%22%20target%3D%22_blank%22%3E%40kennethkong852%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ECurrently%2C%20there%20is%20no%20plan%20about%20the%20dedicated%20implementing%20for%20this%20example.%3C%2FP%3E%0A%3CP%3EBTW%2C%20please%20refer%20to%26nbsp%3B%3CSPAN%3EAN14169%3A%26nbsp%3BHow%20to%20Generate%20a%20User-Defined%20Class%20USB%20Device%20based%20on%20i.MX%20RT%20Chips.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fwww.nxp.com%2Fdocs%2Fen%2Fapplication-note%2FAN14169.pdf%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.nxp.com%2Fdocs%2Fen%2Fapplication-note%2FAN14169.pdf%3C%2FA%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E