I am trying a simple PWM function with the Tiva (or Stellaris) launchpad. I am running on CCS5.4.
The code gets lost while executing peripheral configuration routines, more precisely any Tivaware function that includes PWM0_BASE. Here is the code:
void PWM_Setup(void)
{
SysCtlPWMClockSet(SYSCTL_PWMDIV_1);
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOC);
GPIOPinConfigure(GPIO_PC4_M0PWM6);
GPIOPinTypePWM(GPIO_PORTC_BASE, GPIO_PIN_4);
SysCtlPeripheralEnable(SYSCTL_PERIPH_PWM0);
PWMGenConfigure(PWM0_BASE, PWM_GEN_3, PWM_GEN_MODE_UP_DOWN | PWM_GEN_MODE_NO_SYNC);
PWMGenPeriodSet(PWM0_BASE, PWM_GEN_3, 64000);
PWMPulseWidthSet(PWM0_BASE, PWM_OUT_6,64000 / 4);
PWMOutputState(PWM0_BASE, PWM_OUT_4_BIT, true);
PWMGenEnable(PWM0_BASE, PWM_GEN_3);
}
All the highlighed functions take the PC to invalid locations. I know that because I commented them out one by one. Curious observation: the first time I typed those functions, CCS did not change them automatically to bold blue. It did for all the other functions not highlighted though. It also change the colors after I compiled the code.
When debug stepping into these functions, I get the following error:
Can't find a source file at "C:/DriverLib/build/DriverLib.test/driverlib/sysctl.c" Locate the file or edit the source lookup path to include its location.
If I step over and pause execution instead, I get the following error:
No source available for 0x2104483c
I have a blinking LED in the main loop. If I remove the PWM_Setup() function altogether, the code runs fine.
Thank you for your help!