Hello All,
I am new here and I was trying to blink the led with PWM timer mode. I wrote following code and the blue led was blinking on launch pad.
As I closed the project with the icon on CCS debug mode, however, there was an error message 'Error connecting to the target'. I clicked the 'Retry' button on the dialog and I had an 'Error connectiong to the target: Frequency is out of range' message. I clicked the 'Retry' button again then CCS started to crash.
I restart CCS again but the error messages are persistant. Now, I can't connect to the target anymore and led is still blinking on the target:
CORTEX_M4_0: GEL Output:
Memory Map Initialization Complete
CORTEX_M4_0: Error connecting to the target
CORTEX_M4_0: Error connecting to the target: Frequency is out of range.
Q1) How can I connect to the target again from CCS debug mode? I am using CCSv5.3 and Windows XP with SP2.
Q2) Did I do something wrong?
Thanks,
Bill
int
main
(void)
{
SysCtlClockSet(SYSCTL_SYSDIV_64 | SYSCTL_USE_OSC | SYSCTL_OSC_MAIN |
SYSCTL_XTAL_16MHZ);
//PF2(blue) - T1CCP0: Timer_A
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOF);
GPIOPinConfigure(GPIO_PF2_T1CCP0);
GPIOPinTypeTimer(GPIO_PORTF_BASE, GPIO_PIN_2);
SysCtlPeripheralEnable(SYSCTL_PERIPH_TIMER1);
TimerConfigure(TIMER1_BASE, TIMER_CFG_16_BIT_PAIR |TIMER_CFG_A_PWM);
TimerLoadSet(TIMER1_BASE, TIMER_A, 0xFFFF);
//PWM output inverted for Timer_A
HWREG(TIMER1_BASE + TIMER_O_CTL) |= 0x40;
TimerMatchSet(TIMER1_BASE, TIMER_A, TimerLoadGet(TIMER1_BASE,TIMER_A)/5);
TimerEnable(TIMER1_BASE, TIMER_A);
while(1);
}