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.

F28337xD Problem enabling Auxillary clock

Hi,


I've been trying to get the USB MSC host example running on a F28337D control card (with docking station).


This is the clock initialisation from usb_host_msc.c -

 SysCtlClockSet(SYSCTL_OSCSRC_XTAL | SYSCTL_PLL_ENABLE | SYSCTL_IMULT(20) | SYSCTL_SYSDIV(2));
    SysCtlAuxClockSet(SYSCTL_OSCSRC_XTAL | SYSCTL_PLL_ENABLE | SYSCTL_IMULT(12) | SYSCTL_SYSDIV(4));

The processor gets stuck waiting for the AUX PLL to lock  in sysctl.c (in SysCtrlAuxClockSet()) -

 //Wait for the SYSPLL lock
        while(ClkCfgRegs.AUXPLLSTS.bit.LOCKS != 1)
        {
            // Uncomment to service the watchdog
            // ServiceDog();
        }

The app will run (the console via the virtual UART is working) if you comment out the call to SysCtrlAuxClockSet() but the USB is inoperable.


I managed to enumerate a flash drive once by calling InitSysCtrl() and the setting the aux clock, but a few re-flashes later this stopped working. Almost like some sort of race condition, could it be the second core causing issues?


Also, I tried the sd_card example with similar results, the processor is stuck waiting for the auxpll lock.


Does anyone have a definitely working example of setting up USB? I've tried two different controlCards with the same results so a hardware fault is unlikely.


I'm using CCS 5.5 with all the latest updates installed (including the additional flash support software site mentioned elsewhere in this forum).


Thanks,

Mark.

  • Hello Mark,

    I have seen this kind of behavior before. if you are calling "InitSysCtrl();" function before clock set up, then  this function also initialize flash, flash needs to be set up if you are using flash linked command file. check if you have missed calling this function. also this function has dependence on Predefined symbol "_FLASH", you would want to define this in the project properties and try.

    regards

    Nelson

  • Nelson,

    I am seeing the same behavior at the original poster.  I am having trouble following what you are saying.  InitSysCtrl() is the first thing called in my main function.  After the BIOS starts, I use SysCtlAuxClockSet();.  What should I be doing differently to get rid of this infinite loop catch?

  • i am facing the same problem, Code is stuck on

    while(ClkCfgRegs.SYSPLLSTS.bit.LOCKS != 1)


    Does anyone found the solution?