This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/MSP430F5528: porting USB application from 4MHz resonator to 24MHz crystal

Part Number: MSP430F5528

Tool/software: Code Composer Studio

I'm having issues sourcing a REACH compliant resonator for my design, so I'm trying to migrate the design to a 24MHz crystal. I've prototyped the 24MHz crystal and verified that USB BSL mode works. The issue I'm having is with porting the application firmware. The MCU runs with the faster clock; I've verified that outputs toggle at the expected frequency despite the increase in clock source. However, my USB interface never comes up. Its not detected by windows. Windows does not even suggest there is a faulty device. When I step through execution, USB_connectionState reports ST_USB_CONNECTED_NO_ENUM and the register USBCTL contains FEN=0 suggesting my USB module has simply refused to turn on. 

I have modified descriptors.h as follows:

#define USB_MCLK_FREQ           24000000            // MCLK frequency of MCU, in Hz
#define USB_XT_FREQ_VALUE       24   				// Indicates the freq of the crystal on the oscillator indicated by USB_PLL_XT
#define USB_XT_FREQ       		USBPLL_SETCLK_24_0  // Indicates the freq of the crystal on the oscillator indicated by USB_PLL_XT

In my main.c, USB_MCLK_FREQ is passed to the initClocks function in the unmodified hal.c from the USB examples.

Am I missing something obvious?

How can I troubleshoot what my USB is doing?

Thanks,

Ren

  • Hello Ren,

    Is this a custom board you are using or the target board for MSP430F5528?

    If custom board, which Xtal are you using and what do the loading caps look like if not internal to the Xtal? Can you give a snapshot of the Xtal layout?
  • In addition to the questions asked by Jace, can you also tell us what version of the MSP430USBDevelopersPackage you are using?  Version 5_20_06 of DevelopersPackage has auto crystal detection in its code base and so the user does not need to set the values in the descriptors.h file.  If you are using an older version of the DevelopersPackage then the descriptors.h file only has the following #defines set for XT2:

    #define USB_XT_FREQ_VALUE       4.0   // Indicates the freq of the crystal on the oscillator indicated by USB_PLL_XT
    #define USB_XT_FREQ       USBPLL_SETCLK_4_0  // Indicates the freq of the crystal on the oscillator indicated by USB_PLL_XT

    I noticed that you have also included a value of USB_MCLK_FREQ in the descriptors file.  Have you changed the original USB example? 

    To start from a clean slate, can you re-download the USB example you are using?  If you downloaded an example for which the #defines described above are not present in the descriptors.h file, you do not need to do anything except compile and run the example.  If on the other hand, the example has the #defines specified, then you will need to change the values from 4MHz to 24MHz to run the example. 

    Regards,

    Arthi

**Attention** This is a public forum