Endpoint0 missing OUT data or out of sync, LPC3152 HS Device

1 reply [Last post]
Marks
Offline
Joined: 2012-01-12

I having an issue with missing or out of sync OUT data on Endpoint0,
I think it's a matter of the priming of the OUT endpoint that is not correct,
but i am not sure how to do this correctly.
The Device to Host works fine with the IN endpoint0,
but in Host to Device the SetupPacket is correct but if there is OUT data,
it's either missing or belonging to the previous SetupPacket,
looking at the USB Analyzer trace everything is correct except for the OUT handling
i have attached a image.

Thanks

USB Analyzer trace
0
Your rating: None

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Marks
Offline
Joined: 2012-01-12

I think i have solved the issue, still need to test some more,

When USB_EndPoint0() gets a USB_EVT_SETUP,
it immediately parse the packet without reading the OUT data,
and i have some class requests that need the data,
so what i've done is, if the direction is host to device prime the OUT Endpoint,
and then in the function that handles the class request Read the endpoint.

This seems to work.

feedback