Forum Discussion
Altera_Forum
Honored Contributor
11 years agoHi people,
i suspended my studies on usb for some weeks but i'm back again, and unsurprisingly i got issues cause i'm not a good boy, hoping you will answer me : - My system waits 2 bytes of command from isp so i prepare an OUT ptd like this {x800; x2040; x402; x2; x240} the last word is the payload (command) As a response (ACK?), i get {x402;x2040;x402; x2; x240} (is this an acknowledge?i guess yes) Actual bytes transferred is @2, so it's nice - I want it to send me back awaited data so i prepare an IN ptd like this {x800; x1040; x804 ; x2} this time no payload but i need to tell him how many bytes i want to receive here 4 (i don't know if it's the right way) As a response, i get {x9402; x1040; x804; x2; x6031; F7EB} oh my god, what is that? code 9 is for underrun, 2 bytes received in the payload but 4 actually ? This is not what i want. -Ok let's toggle it and send back the IN ptd again. Oh no same things. -3rd time, toggle it again? Would you work please? Geez, i get {x8000; x1040; x804; x2; x6031; x3412}. x1234ABCD is the payload i wanted, but why this x6031 is still there? I looked after it on usb spec, is that a PID response? 3 = DATA0 1 = OUT 6 = Not Acknowledge Yet 0 = reserved I don't know.... Tell me if i missed something important here. :-/