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.

TMS320F28379D: InitSysPll hangs

Part Number: TMS320F28379D
Other Parts Discussed in Thread: C2000WARE, CODECOMPOSER

I wrote a custom bootloader that stores an application in flash.

When I run the bootloader, its initialization completes successfully, it then detects the application resides in flash and starts the application at a specific address.

By using the debugger and "Assembly Step Into"/"Assembly Step Over" (because I don't have the application's symbols loaded, only the bootloader is loaded in the debugger), I found that the application hangs inside InitSysPll(), specifically when waiting for the SYSPLL lock counter (sysctl.c:363):

            //
            // Lock the PLL five times. This helps ensure a successful start.
            // Five is the minimum recommended number. The user can increase
            // this number according to allotted system initialization time.
            //
            for(i = 0U; i < 5U; i++)
            {
                //
                // Turn off PLL
                //
                HWREGH(CLKCFG_BASE + SYSCTL_O_SYSPLLCTL1) &=
                    ~SYSCTL_SYSPLLCTL1_PLLEN;

                asm(" RPT #60 || NOP");

                //
                // Write multiplier, which automatically turns on the PLL
                //
                HWREGH(CLKCFG_BASE + SYSCTL_O_SYSPLLMULT) = pllMult;

                //
                // Wait for the SYSPLL lock counter
                //
                while((HWREGH(CLKCFG_BASE + SYSCTL_O_SYSPLLSTS) &
                       SYSCTL_SYSPLLSTS_LOCKS) == 0U)
                {
                    //
                    // Consider to servicing the watchdog using
                    // SysCtl_serviceWatchdog()
                    //
                }
            }

Both the bootloader and the application call F2837xD_SysCtrl.c's InitSysCtrl().

If I debug the application (without the bootloader), its initialization works fine, it doesn't hang inside InitSysCtrl().

Do I have to do something in the bootloader to unlock the SYSPLL before starting the application?

Thank you,

Diane