Hi,
I am in the middle of adapting the USB/CDC Freescale MQX code example for my project. This example sets up a 2 way connection ...
(4.1.1 does have a bug in this Freescale example code which has been reported - see here for fix: (I have compiled and uploaded the Freescale 4.1.1 virtual_nic example - how do I verify it is working...))
...between the USB and Ethernet port. In that code interrupts and call backs are setup to take care of USB communication. Still, that code ends up in an infinite loop:
while (TRUE)
{
/* call the periodic task function */
USB_CDC_Periodic_Task();
}/* Endwhile */
I have been told this fragment of code above was to make the overall Freescale USB/CDC example compatible with "bare metal" applications (i.e. w/o the MQX Operating System). So I removed it from my project. But my project, when connected to a Win7 box, always results in a "Disabled" network. Rendering it useless. Even to test applications like WireShark.
I searched for a detailed explanation of this function, but have only found this (MQX_USB_Device_Reference_Manual.pdf):
4.2.4 USB_CDC_Periodic_Task()
Complete any left over activity
during a specified time period.
Synopsis
void USB_Class_CDC_Periodic_Task(void);
Parameters
None
Description
The application calls this
API function to enable the driver to co
mplete any left over activity on the
device’s control endpoint.
Return Value
None
...so, what does "left over activity" mean?
-thanks