AnsweredAssumed Answered

MQX 4.1: USB CDC device "virtual com" not enumerating

Question asked by Hui Shao on Sep 25, 2014
Latest reply on Sep 26, 2014 by soledad

Hi-

 

I have problem to make my board enumerated after plugging USB connector into Windows PC. Windows shows nothing after a connection. My configuration is like:

 

OS: MQX 4.1.1

HW: MX20DX128VFM5

Tool: IAR and I-jet

BSP: k20d50m

 

My costumed board is driven by 8MHz crystal and +5v comes directly from PC USB port. The USB ID detection pin is tied to ground and +5V power is seen on the board after connecting to PC. After calculation my board should supply 48MHz to ARM core.

 

Code wise, I can see the device  stack is initialized OK.  However, in code below, I don't see start_app and start_transactions are TRUE.

       /* call the periodic task function */
       USB_CDC_Periodic_Task(); 
      
       /*check whether enumeration is complete or not */
       if((start_app==TRUE) && (start_transactions==TRUE))

 

No sure where to start the investigation, look at the clock init code in bsp_cm.c:

LDD_TError Cpu_SetClockConfiguration(LDD_TClockConfiguration ModeID)

{

  if (ModeID > 0x02U) {

    return ERR_RANGE;                  /* Undefined clock configuration requested requested */

  }

  switch (ModeID) {

case CPU_CLOCK_CONFIG_0:

...

case CPU_CLOCK_CONFIG_1:

...

case CPU_CLOCK_CONFIG_2:

...

}

...

}

 

Stepping through the clock init code, I see twice of settings are either config_0 and then config_1 (BSP_CLOCK_CONFIGURATION_AUTOTRPM and BSP_CLOCK_CONFIGURATION_DEFAULT?). From there, USB clock prescalers are USBDIV=1 and USBFRAC=0. Is it correct for USB FS?

 

My operation steps are:

1. connect my board to Windows PC USB port

2. Load code through IAR I-jet

 

Windows simply doesn't show anything after  the step above? Where should I start to look into this issue?

Outcomes