lpcusblib 0.98 problems on MCB4300(LPC4357) and endpoint management examples

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

lpcusblib 0.98 problems on MCB4300(LPC4357) and endpoint management examples

546 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by cmt on Wed Oct 23 11:55:24 MST 2013
Hello everyone,

I am in research of lpcusblib v0.98 device part on MCB4300(LPC4357), and have many problems with provided examples.

First of all: all examples do not work with library builded with option:
USE_USB_ROM_STACK0
Some of examples are never been enumerated correctly: there is always state "device is not recognized" on host (Win7/64) and only device descriptor returns from device. Other examples like as CDC device is sometimes enumerated succesfully but not always, and does not work correctly anyway, because some specific interface request from host fails. When enumeration is failed the state is the same - only device descriptor returns from device. The same time all of examples which i additionaly check with USB-IF command verifier pass all request tests, but enumeration also fails.
It is actually seems like a problem with timings delays fails for some of time critical USB request, because enumeration status (fail or success) is not always the same at each code execution of the same example. I was also trying to enable/disable option USB_FORCED_FULLSPEED and it does not help.
Does anybody see the same problem or has some idea how to fix it?

So the next step i was trying library option:
USE_USB_ROM_STACK1
and found that USB part of all examples which i interested in works almost fine (AUDIO OUTPUT, HID GENERIC, and VIRTUAL CDC).
There is issue in this case: there is only distortions from on-board speaker/speaker connected to line-out output instead of normal sound with audio output device example. So if there is cause of problem or solution you know please advise.
And another problem in this case is that USB-IF CV finds that device (for all 3 examples) has 2 configurations (but actually it has only 1) and performs request tests twicely: for 0 index all tests passed, for 1 - all failed. Enumeration test is always passed for all examples. I am not sure that described problem is actually significant, because it works OK on Win7, but may be there will be problems on MacOS or Linux.

But my main question is not related to described problems. Now i am trying to implement MIDI device with USE_USB_ROM_STACKenabled. I wrote descriptors and enumeration works fine always. Device is recognized OK. The problem i have is that i cannot force device to transmit packets. I wrote my code based on audio output example. I have done all ep operations as it done for audio example and also made some corrections
- for bulk endoints as it described in docs and,
- prepare transfer and prime ep on configure event instead of interface alt event as it done in audio example;
but there is not any activity on IN and OUT endpoint: endpoints' IRQs are not called.
So, can anybody provide some step by step example for how actually ep management should be done for IN and OUT ep.

Thank you.
Labels (1)
0 Kudos
0 Replies