AnsweredAssumed Answered

Trouble with USB stack on K22FN

Question asked by MILLER on Nov 22, 2015
Latest reply on Nov 23, 2015 by MILLER

I've got an MK22FN1M0VLH12 with Freescale USB stack v4.1.1 using the provided Processor Expert components with CodeWarrior 10.6.  No idea if this is a supported or tested configuration and I can't find any docs that say one way or the other, but I don't see any reason it shouldn't work - and I say this after way too many hours of troubleshooting.

 

I'm implementing a mass storage device based on the example provided with the stack.  Everything seems to initialize fine, the proper pull up is applied to D+, and the reset signal from the host generates an interrupt as expected.  SOF packets also generate interrupts and their frame numbers match what I'm seeing on my USB protocol analyzer, so the physical layer seems fine.  I checked with an oscilloscope just in case, and I don't see anything obviously wrong.

 

The problem is that after the stack handles the USB reset and sets up the control endpoint, it never gets a TOKDNE interrupt.  On the protocol analyzer I can see that no ACK packet is ever sent in response to the host's SETUP transaction.

 

I've stepped through everything from the reset interrupt on, and I can't see why the SIE isn't responding to the SETUP.  As far as I can tell, even if the rest of the stack is totally broken, it's at least set up properly so that the transaction should complete and generate a TOKDNE interrupt.

 

Any ideas?  I'm running out of things to check.

 

Thanks,

 

Scott

Outcomes