This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320C6454 is getting reset

Other Parts Discussed in Thread: TMS320C6454

Hi Everyone,

I am Aravind, working on TMS320C6454  processor with NDK. I am facing a strange issue. Before I explain the problem, let me explain the software architecture.

As you can see from the above flow chart after power ON following things will happen.

(1) Software upgrade code runs and waits for 3 seconds to see if any flash upgrade code is coming from the UART. 

(2) If software upgrade command has come from UART, then processor directly starts copying received bytes from UART to flash.

(3) If software upgrade command is false, then processors loads the program from flash memory to RAM. And starts execution.

We are using NDK in our 6454 processor. As I know, NDK boots first and then it jumps to main(). I think, booting NDK approximately takes 3 to 4 seconds.

It typically takes 6 seconds after power ON to get first message from UART. 

Now, coming to real question/problem. 

Whenever I am running the code for long time say 3 to 4 days, I am observing that processor is getting restarted. For debugging purpose I am time stamping UART to see what is the duration in which restart is happening. 

Initially I thought that in our application code somewhere code is ending up with while (1) loop and watch dog timer is giving reset to processor. But I came to know that my assumption is wrong. Because if watch dog timer gives the reset then to get first UART message, it requires 6 seconds, but i am seeing that UART message is coming very next second.

I am suspecting that some where in the code some exception or some address malfunction is happening and NDK is taking the program counter back to main().

Is there any thing in NDK which can handle such situations?? Like exception handling? Or at-least in processor?

This problem is not easily repetitive, I mean every time when I long run the code this problem is not occurring. But, once in a while out of 3-4 processors one processor is behaving like this.

Kindly help me,

Thanks in advance,

Aravind D Chakravarti

Accord Software and Systems, 

Domlur, Bangalore - 570021

  • Hi,
    Do you have any other peripheral stuff other than NDK ?
    Please make sure that you have sufficient stack size for the project.
    Just try to increase the stack size and see the same behavior occurs.
  • HI Titus,

    Thank you your response.

    Except NDK there is only our application software. I checked with the MAP file generated by the code.  I found that still lots of space is left in RAM. Does this mean even I have more stack left?? I am attaching my MAP file so that it will be clear to you. I have changed to file name to project.txt, because .map format is not up-loadable in the website.


    And also how to increase stack size? I think in NDK we can do this from TCF file, but I am unable to open it. Kindly help me to change the stack size.

    Thank you,

    Aravind D Chakravarti

  • Hi,
    Add the following line in tcf file to modify the stack.
    bios.MEM.STACKSIZE = <size in hex>
  • Thank you Titus.

    I tried opening TCF file in CCS3.2. Unfortunately every time CCS is getting crashed.

  • Hi,
    Try to open the tcf file with "Text editor" with help of "right click" option of that tcf file.
  • Hi Titus,

    Sorry for delayed reply. I was testing with few other things in my code.

    I could not determine what should be the stack size for my code. So, I didn't change anything in .tcf file.

    However, I could figure out that during every task creation we used 0x1400 bytes as stack size. I am sharing example below.

    	htask_1_msec   = TaskCreate(task_1_msec,"Task 1 msec",OS_TASKPRINORM,0x1400,0,0,0);
    	htask_15_msec  = TaskCreate(task_15_msec,"Task 15 msec",OS_TASKPRINORM,0x1400,0,0,0);
    	htask_100_msec = TaskCreate(task_100_msec,"Task 100 msec",OS_TASKPRINORM,0x1400,0,0,0);
    	htask_500_msec = TaskCreate(task_500_msec,"Task 500 msec",OS_TASKPRINORM,0x1400,0,0,0);
    	htask_700_msec = TaskCreate(task_700_msec,"Task 700 msec",OS_TASKPRINORM,0x1400,0,0,0);
    	htask_800_msec = TaskCreate(task_800_msec,"Task 800 msec",OS_TASKPRINORM,0x1400,0,0,0);
    	htask_ntp_broadcast  = TaskCreate(ntp_broadcast,"Task NTP Broadcast",OS_TASKPRINORM,0x1400,0,0,0);
    	htask_nmea_broadcast = TaskCreate(nmea_broadcast,"Task NMEA Broadcast",OS_TASKPRINORM,0x1400,0,0,0);

    Whether still I need to mention about this in stack size?

    I have one more query,

    I saw that small problem was there in the way I was handling the interrupt. I have a small doubt. How NDK will handle interrupts? In NDK reference guide, no where they have mentioned about 'PUSH' & 'POP' of stack.  In CPU instruction guide (spru732j) they have given interrupt handling procedure. They have also mentioned about nested interrupts and many other things. Should I manually do push & pop?

    Please see my example interrupt service routine 

    // Enabling interrupts
    void En_Interrupt_Timer()
    	IntSetup    hwi_intSetupGpio;
        Uint32      retVal;
    	IntGpioVector = 7;
    	IntFlag = 1 << IntGpioVector;
        hwi_intSetupGpio.intVectId = 7;
        hwi_intSetupGpio.sysEvtCount = 1;
        hwi_intSetupGpio.sysEvtId[0] = 69;				// Event ID for Timer1 Low Counter Interrupt
        hwi_intSetupGpio.pCallbackFxn = &timer1_isr;
        hwi_intSetupGpio.pCallbackArg = 0;
        hwi_intSetupGpio.bEnable = 1;
        retVal = Interrupt_add(&hwi_intSetupGpio);
        if(retVal != 0)
    		asm(" NOP ");
    // Interrupt service routine
    void timer1_isr()
    	if(++i_timer_cnt_15_msec >= 15) 
    		i_timer_cnt_15_msec = 0;
    	if(++i_timer_cnt_100_msec >= 100)
    		i_timer_cnt_100_msec = 0;

    Should I add anything like push, pop, interrupt masking and other things in service routine?

    Kindly reply.

    Thank You,


    Aravind D Chakravarti

  • Hi Titus,

    Can you atleast explain how interrupt will be happened in NDK 2.0?
    Rest of the things I will try to solve myself.

    Thanks in advance!