AnsweredAssumed Answered

HS USB CDC device freezing on K28

Question asked by Jeff Hane on Jan 31, 2019
Latest reply on Feb 9, 2019 by Mark Butcher


  I'm working with a FRDM-K28F board running FreeRtos with SDK version 2.5.0.   I am basing my project on the dev_cdc_vcom_freertos example.  

  The board is booting and I can see /dev/ttyACM1 on my linux box.  I'm using python's serial class to open the device and write to the port.  However, in a very short amount of time the k28 appears to hang and is non-responsive.  I can create problem doing a number of single write less 512 bytes or writing a large chunk of data, like 25k bytes.

  Using usbmon, I can see the bulk writes going out but no response from the device.   If I pause the program, it usually is just spinning in the main task on this code:


if ((1 == s_cdcVcom.attach) && (1 == s_cdcVcom.startTransactions))
   /* User Code */
   if ((0 != s_recvSize) && (0xFFFFFFFF != s_recvSize))


The first if is always true but s_recvSize is always 0.  


I put a breakpoint at the start of the EhciIsr and I never get an interrupt.  However, if I let the host write timeout and then close the serial port I do get the interrupt on the control endpoint and the device responds back.  This tells me it's not totally bricked but it's doesn't seem to be responding to bulk interrupts.  


I'm trying to figure out what to look at next so any ideas would be great.