AnsweredAssumed Answered

MK20DN512ZVMC10 USB Host enumeration problem.

Question asked by leondain on Oct 30, 2012
Latest reply on Feb 26, 2014 by fernandogarcia

We've created a product on base of MK20DN512ZVMC10 and set it up properly on software level. Although, it doesn't enumerate any USB device connected to the USB port. The register TXSUSPENDTOKENBUSY is set to 1 right after the first setup packet sent over USB. SOF packets get generated and their transmission is going on over D+ and D-.

The code from khci.c which is makes this happen is following:

case TR_CTRL: 
bd_ptr = (uint_32*) BD_PTR(0, 1, usb_host_ptr->tx_bd);
*(bd_ptr + 1) = HOST_TO_LE_LONG((uint_32)buf);
*bd_ptr = HOST_TO_LE_LONG(USB_BD_BC(len) | USB_BD_OWN);
  ------>        usb_ptr->TOKEN = (uint_8)(USB_TOKEN_TOKENENDPT((uint_8)pipe_desc_ptr->G.ENDPOINT_NUMBER) | USB_TOKEN_TOKENPID_SETUP);
usb_host_ptr->tx_bd ^= 1;
break;

 

We've tried to run the software from RAM and from FLASH with no results. We have 2.2pF on VOUT33 so recommendations from other posts do not work. We have tested it with 3 different configurations: added external mouse, external hub, and our internal hub. The same code with the same equipment works fine on TWR-K53. We are using 8MHz external oscillator. Source code for initialization of clocks are in attachment.

Please, help to locate a problem ASAP.

Outcomes