Part Number: TM4C129ENCPDT
Other Parts Discussed in Thread: UNIFLASH
Hello,
I have a problem with my custom designed Tiva TM4C129ENCPDT MCU. When I embed the code with CCS6.1.0, I get ''Error Connecting to the target" error
I have 5 of my custom boards. The awkward situation is that the code can be debugged, I can reach the MCU for the first debug operation. Then for the rest of the trials for debugging, CCS gives the "Error Connecting to the target" error. I use the code below.
#include <stdint.h>
#include <stdbool.h>
#include "inc/hw_memmap.h"
#include "inc/hw_types.h"
#include "driverlib/rom.h"
#include "driverlib/rom_map.h"
#include "driverlib/sysctl.h"
#include "driverlib/gpio.h"
int main(void)
{
// Sistem Clock: 120 Mhz
MAP_SysCtlClockFreqSet((SYSCTL_XTAL_25MHZ | SYSCTL_OSC_MAIN | SYSCTL_USE_PLL | SYSCTL_CFG_VCO_480), 120000000);
MAP_SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOK);
MAP_GPIOPinTypeGPIOOutput(GPIO_PORTK_BASE, GPIO_PIN_0);
MAP_GPIOPinWrite(GPIO_PORTK_BASE, GPIO_PIN_0, 0x00);
MAP_GPIOPinWrite(GPIO_PORTK_BASE, GPIO_PIN_0, GPIO_PIN_0);
while(1);
}
If I remove the "MAP_SysCtlClockFreqSet" function, the problem is gone. I can debug multiple time instead of one time.
Do you know any common problem like in this circumstance?
If I don't configure the system clock, there is no problem. When I configure the clock, the code can be debugged for one time, then I cannot reach the MCU again.
It is not much related but I would like to ask a question. When I do not configure the System clock, what happens? What is the default setting for the system clock?
Thanks