AnsweredAssumed Answered

USB CDC Virtual Com TX lockup

Question asked by Matthew Lang on Jan 4, 2018

I have an MCUExpresso project and a FRDM K22 board. I have the virtual comm demo running. I edited the virtual_com app to send a full 32 byte packet as fast as possible. 


I tried to edit the demo as little as possible and all changes are in the virtual_com.c file. Once the character 'g' is received from the PC, the sending starts. It sends a packet, then waits for a transmit complete flag to be set in the "kUSB_DeviceCdcEventSendResponse" send complete interrupt callback. Once the flag is set, it send another packet and repeats. RealTerm  gets around 679000 characters before all comms stop.


The "kUSB_DeviceCdcEventSendResponse" callback is never called again. The g_txComplete flag is false and the callback is never called to set it true again. It's like the USB stack missed something. 


I am using RealTerm to capture the serial data. Why is this locking up? I have the project attached.