Hi,
i am working on K22 based micro-controller. I am working with USB stack (SDK 1.3). Firstly i was using only for 2 MSD and now i want to drive speaker also via usb.
The changes i have done in the stack is that i have allocated the static memory wherever dynamic memory is allocated and its working with 2 MSD.
I have added audio_speaker.c/.h in my project and trying to run the code, Hardfault error is coming. Hardfault is coming from _usb_host_unlink_tr() function, i dont know why:(. tried decoding but no luck.
If somebody guide me how to add audio functionality to drive speaker or share a code (MSD + Audio), it will be a great help.
Thank you.
Hi Aniket,
There is a document guide you to build a composite devie. Please find the MCUXpresso SDK USB Stack Composite Device User's Guide in SDK_2.2_TWR-K22F120M\docs\usb.
Regards
Jing
Hi Jing Pan,
i am using USB in Host mode and i think document is for USB device. So confused.
How to use two different classes in USB host mode? (MSD + Audio)
Thank you.
Hi Aniket,
First I'm a bit curious why you want to build your project base on ksdk1.3. I have to say this version is not easy to use in many aspect. The USB stack is also worse than those new versions. My suggestion is migrate to SDK2.2 before you begin your project.
Hardfault May caused by many reasons. Most of them may caused by stack overflow or pointer error. If you still have problem and insist on sdk1.3, would you mind to send me your code so that I can take a look for you.
Regards
Jing
Hi Jing,
thank you for the reply. I have migrated usb stack from sdk1.3 to sdk 2.2.
But since project includes following
-using quantum leaps framework and converting dynamic memory allocation to static memory for standard compliance.
i am facing some issues while running the code (USB hub is not getting enumerated completely). I am debugging now but not able to get the problem.
I don't know now how to proceed further exactly. Some guidance will be a great help.
Thank you.
Regards,
Aniket