Other Parts Discussed in Thread: CONTROLSUITE
Tool/software: Code Composer Studio
I'm using CCS v5.5.0 and I imported the Blinky-M3 project from ControlSUITE examples for F28M35x concerto. When I try to debug the code using Cortex-M3 Device Cycle Accurate Simulator Little Endian simulator, the program stuck in setting up the PLL. the code is as follows:
//! A very simple example that blinks the on-board LED3.****************** #ifdef _FLASH // These are defined by the linker (see device linker command file) extern unsigned long RamfuncsLoadStart; extern unsigned long RamfuncsRunStart; extern unsigned long RamfuncsLoadSize; #endif //***************************************************************************** // The error routine that is called if the driver library encounters an error. //***************************************************************************** #ifdef DEBUG void __error__(char *pcFilename, unsigned long ulLine) { } #endif //***************************************************************************** // // Blink LED3 //***************************************************************************** int main(void) { volatile unsigned long ulLoop; // Disable Protection HWREG(SYSCTL_MWRALLOW) = 0xA5A5A5A5; // Sets up PLL, M3 running at 75MHz and C28 running at 150MHz SysCtlClockConfigSet(SYSCTL_USE_PLL | (SYSCTL_SPLLIMULT_M & 0xF) | SYSCTL_SYSDIV_1 | SYSCTL_M3SSDIV_2 | SYSCTL_XCLKDIV_4); #ifdef _FLASH // Copy time critical code and Flash setup code to RAM // This includes the following functions: InitFlash(); // The RamfuncsLoadStart, RamfuncsLoadSize, and RamfuncsRunStart // symbols are created by the linker. Refer to the device .cmd file. memcpy(&RamfuncsRunStart, &RamfuncsLoadStart, (size_t)&RamfuncsLoadSize); // Call Flash Initialization to setup flash waitstates // This function must reside in RAM FlashInit(); #endif // Enable clock supply for LED GPIOs SysCtlPeripheralEnable(LED_0_PERIPH); SysCtlPeripheralEnable(LED_1_PERIPH); // Disable clock supply for the watchdog modules SysCtlPeripheralDisable(SYSCTL_PERIPH_WDOG1); SysCtlPeripheralDisable(SYSCTL_PERIPH_WDOG0); // Enable processor interrupts. IntMasterEnable(); // Set up the Pin for LED3 GPIOPinTypeGPIOOutput(LED_1_BASE, LED_1_PIN); GPIOPinWrite(LED_1_BASE, LED_1_PIN, ~0); // Loop forever while the timers run. long int portBefore = 0; int output[16]; int i = 0; for(i = 0; i < 16; i++) output[i] = i; while(1) { // // Turn on the LED. // GPIOPinWrite(LED_1_BASE, LED_1_PIN, 0); // // Delay for a bit. // for(ulLoop = 0; ulLoop < 20000; ulLoop++) { } portBefore = GPIOPinRead(LED_1_BASE, LED_1_PIN); // // Turn off the LED. // GPIOPinWrite(LED_1_BASE, LED_1_PIN, ~0); // // Delay for a bit. // for(ulLoop = 0; ulLoop < 20000; ulLoop++) { } portBefore = GPIOPinRead(LED_1_BASE, LED_1_PIN); } }
Can anyone please explain why this is happening? I've read in some forum that this simulator doesn't simulate PLL. Can this be the cause of this problem?