Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

USB Host with MAX3421E and ATxmega192A3U

Status
Not open for further replies.

jblasius

Newbie level 1
Joined
May 14, 2012
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,295
Hello,

I'm implementing a USB Host with MAX3421E and ATxmega192A3U.

I'm getting the WRONGPID error when I'm getting data from the in endpoint:
max3421e_write(MAX_REG_HXFR, (tokIN | device->bulk_in.address));

The Programming Guide refers to the tokIN as PID. I the code above the tokIN is 0b00000000 (HS=0, ISO=0, OUTNIN=0, SETUP=0), so what can be wrong here?!

The only thing that can be wrong if the PID error is related to the endpoint adress.

These are the descriptors that I've got during configuration:
Configuration Descriptor: 09 02 20 00 01 01 00 80 64
Interface Descriptor: 09 04 00 00 02 08 06 50 00
InEndpoint Descriptor: 07 05 81 02 40 00 00
OutEndpoint Descriptor: 07 05 02 02 40 00 00

So the bulk_in.address is 0x81 and the bulk_out.address is 02.

And I've initialized the bulk_in:
bulk_in.address = 0x81
bulk_in.sendToggle = bmSNDTOG0;
bulk_in.receiveToggle = bmRCVTOG0;
bulk_in.attributes = USB_TRANSFER_TYPE_BULK;
bulk_in.maxPacketSize = wMaxPacketSize;//wMaxPacketSize = 0x0040

I don't have any problems in reading or writing during the configuration process, that is why I was able to get the informations for the descriptors.

I also don't have any errors when I'm writing to the bulk_out.

I only have the hrWRONGPID error when read from the bulk_in.

Does anyone have experience with max3421e?? I really need help :cry:
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top