Quantcast
Channel: Forums - Recent Threads
Viewing all articles
Browse latest Browse all 262198

CCS/TMS320F28335: JTAG programming error

$
0
0

Part Number:TMS320F28335

Tool/software: Code Composer Studio

Hi, i am working in my TMS320F28335 test board. During debugging CCS shows

"C28xx: Error connecting to the target: (Error -1155 @ 0x0) Device may be operating in low-power mode. The debugger has forced the device to wake up. Choose 'OK' to attempt to complete the debug connection. (Emulation package 8.0.903.6)" 

After observing i found that I mistakenly left XRSn pin unconnected. So i tried to made XRS pin manually high during debugging, still i get the same error. Next step i manually reset the device by pulling the VDD low, Now CCS debugs but program doesnot works. I am new to DSC's and CCS, so i can't able find my mistake. Could anyone notice my mistake please give any solution. Hereby i attached my program to blink LED and the reported CCS screen.

And please let me know what is the exact procedure and steps to be followed to debug the DSC for first time in CCS

#include "DSP2833x_Device.h"     // Device Headerfile and Examples Include File


void System_control(void);
void Peripheral_cntrl(void);
void EnableInterrupts(void);

void delay_loop(void);
void Gpio_select(void);
void Gpio_example1(void);


void main(void)
{

    System_control();
    Peripheral_cntrl();
    EnableInterrupts();
    Gpio_select();

    IER = 0x0000;
    IFR = 0x0000;
    Gpio_example1();

}

void delay_loop()
{
    volatile long i;
    for (i = 0; i < 1000000; i++)
    {

    }
}

void Gpio_example1(void)
{

    for(;;)
    {
        GpioDataRegs.GPADAT.all    =0xAAAAAAAA;
        delay_loop();

        GpioDataRegs.GPADAT.all    =0x55555555;
        delay_loop();
    }
}

void Gpio_select(void)
{
    EALLOW;
    GpioCtrlRegs.GPAMUX1.all = 0x00000000;  // All GPIO
    GpioCtrlRegs.GPAMUX2.all = 0x00000000;  // All GPIO
    GpioCtrlRegs.GPADIR.all = 0xFFFFFFFF;   // All outputs
    EDIS;
}

void System_control(void)
{

    EALLOW;
    SysCtrlRegs.WDCR= 0x0068;

    XintfRegs.XINTCNF2.bit.XTIMCLK = 1;
    XintfRegs.XINTCNF2.bit.CLKMODE = 1;
    XintfRegs.XINTCNF2.bit.CLKOFF = 0;

    SysCtrlRegs.HISPCP.all = 0x0001;
    SysCtrlRegs.LOSPCP.all = 0x0002;

    SysCtrlRegs.PCLKCR3.bit.CPUTIMER1ENCLK = 1; // CPU Timer 1
    SysCtrlRegs.PCLKCR3.bit.GPIOINENCLK = 1;    // GPIO input clock

    EDIS;
}

void Peripheral_cntrl(void)
{
    DINT;

    //
    // Disable the PIE
    //
    PieCtrlRegs.PIECTRL.bit.ENPIE = 0;

    //
    // Clear all PIEIER registers
    //
    PieCtrlRegs.PIEIER1.all = 0;
    PieCtrlRegs.PIEIER2.all = 0;
    PieCtrlRegs.PIEIER3.all = 0;
    PieCtrlRegs.PIEIER4.all = 0;
    PieCtrlRegs.PIEIER5.all = 0;
    PieCtrlRegs.PIEIER6.all = 0;
    PieCtrlRegs.PIEIER7.all = 0;
    PieCtrlRegs.PIEIER8.all = 0;
    PieCtrlRegs.PIEIER9.all = 0;
    PieCtrlRegs.PIEIER10.all = 0;
    PieCtrlRegs.PIEIER11.all = 0;
    PieCtrlRegs.PIEIER12.all = 0;

    //
    // Clear all PIEIFR registers
    //
    PieCtrlRegs.PIEIFR1.all = 0;
    PieCtrlRegs.PIEIFR2.all = 0;
    PieCtrlRegs.PIEIFR3.all = 0;
    PieCtrlRegs.PIEIFR4.all = 0;
    PieCtrlRegs.PIEIFR5.all = 0;
    PieCtrlRegs.PIEIFR6.all = 0;
    PieCtrlRegs.PIEIFR7.all = 0;
    PieCtrlRegs.PIEIFR8.all = 0;
    PieCtrlRegs.PIEIFR9.all = 0;
    PieCtrlRegs.PIEIFR10.all = 0;
    PieCtrlRegs.PIEIFR11.all = 0;
    PieCtrlRegs.PIEIFR12.all = 0;
}

void EnableInterrupts(void)
{
    PieCtrlRegs.PIECTRL.bit.ENPIE = 1;
    PieCtrlRegs.PIEACK.all = 0xFFFF;
    EINT;
}


Viewing all articles
Browse latest Browse all 262198


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>