Elizabeth Russell

USB program runs from JTAG download but not from POR

Discussion created by Elizabeth Russell on Mar 24, 2013
Latest reply on Apr 30, 2013 by dspNeil

I have a critical situation with a product that is being updated to a Kinetis processor and production is being held up by this issue! A service request was entered weeks ago; however, the responses have not been helpful. I would really appreciate any help in resolving this problem!!

 

I have a program running on a Kinetis K601FN150 target board that is supposed to communicate via USB with desktop apps on both a Mac and a PC.

I am using Freescale's USB Stack Version 4.03 and CW 10.2.

 

The Kinetis program sends vendor requests over the Control EP and transfers data over a Bulk EP.

When the Kinetis program runs from a download over JTAG (debug and run) the program works perfectly.

When the Kinetis program runs from a POR, it enumerates successfully but fails after the Set Configuration call in the desktop app. It does not respond to the first vendor request on the Control EP. The result is the same when communicating with either the Mac or the PC app.

 

To try and determine where the program is failing, I placed print statements in both the USB_ISR() and the USB_Bus_Token_Cpl_Handler() routines.

These added print statements will cause the downloaded version to fail after the first sequence of a Vendor Request on the Control EP and an IN command on the Bulk EP. However I can cause the program to run correctly by using breakpoints in the desktop app to control the communication. This same use of breakpoints does not improve the program when it starts from a POR. The print statements reveal that the Set Configuration command completes normally but there are no subsequent interrupts received by USB_ISR(). This is also confirmed by the output of a USB analyzer which shows the vendor request being sent with the setup packet and the DATA0 packet - but there is no responding ACK. I have all the error interrupts enabled but no error interrupt is being generated either.

 

I am really at a loss as to what to try next but really need to get this working.

 

There must be something different about the downloaded version versus the one running out of reset

but I don't know what (although it seems like a timing problem).

 

Thanks,

 

Elizabeth

Outcomes