AnsweredAssumed Answered

Kinetis Design Studio  USB "3TR Timeout!" in khci.c

Question asked by Robert Hana on Aug 25, 2014
Latest reply on Dec 19, 2017 by Giac Dinh

Hello,

 

    At the moment I am working with host_msd_fatfs_frdmk22f120m_bm (but attempting to run this on an MK22FN1MOVLQ12. The system has been tested with other USB projects in CodeWarrior 10.6 so I know it works.) I can get debug messages through RS-232, and after I put in a USB stick I will get this output:

 

USB file system test

Waiting for USB mass storage to be attached...

3TR Timeout!

 

The  USB vectors are the same, so I would expect any interrupts from the USB module to work without issue.The register values in the USB module

show activity.

 

in khci.c the message is generated here inside usb_khci_task(), and after detecting "usb_host_ptr->device_attached" is true:

 

  else if (( tr_state == KHCI_TR_TRANSMITING))

        {

            if (curr_msg.pipe_desc->pipetype != USB_INTERRUPT_PIPE)

            {

                if ((_usb_khci_get_total_frame_count(usb_host_ptr) - curr_msg.frame) > TIMEOUT_OTHER )

                {

                    res = KHCI_ATOM_TR_BUS_TIMEOUT;

                    tr_state = KHCI_TR_TRANSMIT_DONE;

                    done_msg = curr_msg;

                    printf("3TR Timeout!\n");

                    return;

                }

            }

        }

 

Any idea on what could be happening? Am I correct in assuming that the MK22F51212 code for USB should run on an MK22FN1MOVLQ12?

 

Thanks.

Outcomes