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.
Hello I am having the same problem I am using a 12Mhz crystal, and my software get stuck in the same position as Nima mentioned in his post, I used the line that he mentioned but didn't help, it still getting stuck .
Please if you have any suggestion let me know
How can I operate if already tried with all 4 values XT2DRIVE_0,1,2 and 3?, checking the includes for that macro CCS has options either msp430f5529.h or msp430f55xx_6xxgeneric.h as library files, can it provide any issue? even if both files have the same values for the macros.
Thanks for your support James. My crystal is a Seiko-Epson FA-20H12Mhz
In fact fdoing further test even with UCS_turnOnXT2 function from driverlib, configuring it between 8_16Mhz that corresponds to XT2DRIVE_1 still produce a infinite loop but this time in mentioned function.
Please if you have any idea how to solve the problem please let me know, thank you so much
Regards
Hello,
Can you try setting the USB_XT2Freq value to the crystal frequency you are using? The Programmers_Guide_MSP430_USB_API.pdf document, section 2.1.9 shows you what values you need to set to override the auto detection of the crystal frequency.
Please let me know if that works for you.
Regards,
Arthi Bhat
Dear Arthi, I was without connection these days that's why my late answer, I checked the guide for usb API and in the section 2.1.9 talks about the "Memory Requirements", maybe you wanted to refer to the section 11.2 Clock Management?, I will review the guide looking for the functions to override the auto detection, if you have the specific section please let me know, thank you for you support
regards
Tomas Alarcon
Hello Tomas,
Which version of the USB stack are you running? To find out, you can open up a usb related file like hal.c and scroll to the bottom of the file, there should be the version of the USB listed there - 'Released xx_xx_xx'.
If you are using anything older than version 5_20_06_xx then XT2 crystal value needs to be entered manually in the descriptors.h file. The information on setting this value using the Descriptor Tool is described in Section 5.5.1 of the Programmers Guide.
In USB release version 5_20_06_xx, XT2 crystal value is detected automatically and the solution I listed above was for overriding this detection and manually setting the crystal value.
It looks like you are using a version older than 5_20_06_xx and so you will have to set the following values as appropriate to your crystal in the descriptors.h file:
#define USB_PLL_XT 2 // Defines which XT is used by the PLL (1=XT1, 2=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
If you have already set these to the correct value and are still having problems you might need to review your USB design if you are using your own EVM board.
A great reference for starting a USB design with MSP430 can be found in document, SLAA457a.pdf.
Regards,
Arthi
Dear Arthi,
effectively I am using the version: "//Released_Version_5_20_06_02" , I tried the line that you suggest in the post that i related this, in my case I am using one crystal of 12Mhz recommended for MSP430F5529, actually I had reviewed slaa457a before to start my project, as in your post my software get stuck inside of USB_setup, may be I tried wrong clearing HWREG16 and introducing the other driver values, or just clearing with the line that you suggested, should be enough for the automatic detection?the hardware design is base in the recommendations from the different manual either for hardware as for functions, as I mentioned before I used a Seiko crystal FA-20H whit two capacitors of 10pF.
WDT_A_hold(WDT_A_BASE); // Stop watchdog timer PMM_setVCore(PMM_CORE_LEVEL_0); // Vcore setting required is PMM_CORE_LEVEL_0 due SMCLK = 8MHz USBHAL_initPorts(); // Config GPIOS for low-power (output low) USBHAL_initClocks(8000000); // Config clocks. MCLK=SMCLK=FLL=8MHz; ACLK=REFO=32kHz setBatteryController(); //Set the port to activate and control the battery Controller setTimerParameters(); // Prepare timer for LED toggling //Clear XT2drive field HWREG16(UCS_BASE + OFS_UCSCTL6) &= ~XT2DRIVE_3; USB_setup(TRUE, TRUE); // Init USB & events; if a host is present, connect __enable_interrupt(); // Enable interrupts globally
The functions set*****() are just custom functions to set some ports or configure the timer parameter that are not related with the starting of the crystal
Which hardware issues can affect the behave of the fault flag of xt2?
I will trying to place all the functions for USB before any other to see if there is any conflict between my custom code and the API .
Hello Tomas,
Please try running the code example MSP430F55xx_UCS_07.c and check if you stuck on the oscillator flag do-while loop:
If you are getting stuck this may be due to incorrect load caps or a bad crystal. Have you tested the board with a different crystal?
Also, are you running this test on a TI hardware? This could help us replicate the issue.
Best regards,
Erick
Hello Erick, I had test the example in my board, is a self design based in TI recommendations documents but not a TI design, I will change today the caps and if is necessary the crystal, to see if is one of those, I will keep update the results
Hello Tomas,
We're thrilled that you got everything working. Nice work! Also, thanks for sharing the solution with our community. I'm sure it will benefit others who may face the same issue.
Regards,
James
MSP Customer Applications
**Attention** This is a public forum