Hello!
I have a board with atmel sam3u mcu. Unfortunately, I didn't find USB-CDC example for this mcu, so I ported example for MCB2300 using some USB code from USB-HID and USB-MSC examples which are available. USB and CDC initialization works fine, data sending works without problems as well. But I have problems receving data via virtual COM-port. When I try to send data from terminal application on my PC it just reports communication error (tried other terminal applications - some of them just freeze, some also give errors). I suppose the problem is here (usbuser.c):
/* * USB Endpoint 2 Event Callback * Called automatically on USB Endpoint 2 Event * Parameter: event */ void USB_EndPoint2 (U32 event) { switch (event) { case USB_EVT_OUT: CDC_BulkOut (); /* data received from Host */ break; case USB_EVT_IN: CDC_BulkIn (); /* data expected from Host */ break; } }
I set a breakpoint and it seems that USB_EVT_OUT event is never raised, so CDC_OutBufAvailChar reports 0 bytes in buffer and so on.
What can I check? Maybe some misconfiguration?
Thanks a lot!