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.

TMS320F280049: Cannot execute program after execution with different entry point

Part Number: TMS320F280049


Hi team,

Our customer observed a wired problem.

The problem is their cannot execute after power up.

For a successful power up, the waveform is as below(CH2:XRS CH1:ePWM):

However, for a failed power up the waveform is(CH2:XRS CH1:ePWM). XRS fall down after 15ms, and no ePWM can be generated.

The only difference between this two code is the two bold lines in the main loop.

    while(1)//Main loop

   {

        ViewNum1U32 = 0;

        ViewNum2U32 = 0;

        ......

   }

According to our knowledge, we have suggested them to disable the watchdog in f28004x_codestartbranch.asm. And the problem is solved successfully. 

Our customer want to know the reason of this problem. They observed in the map file that if address in  "ENTRY POINT SYMBOL: "_c_int00"  address: 00083e24" is ended by a odd number. The execution is failed. If the address is ended with even number, the execution will be successful.

I am not sure whether this make sense to you. But this customer has just turn to C2000 from other platfrom, so they hope to make sure we have no potential problem.

Thanks for you help.

 

  • Hi Wang,

    You mentioned, If customer disables the watchdog then issues is resolved. Is the WD disable code inside main? What is the address for these two variables? Are these global variables? Since there is while(1) loop inside main(), does customer has a WD handler to clear the watchdog count before it expires (which will reset the device) ?

    Vivek Singh
  • 1. The disable code is not in main function. We disabled the watchdog in "f28004x_codestartbranch.asm" to make sure the watchdog is disabled at the very early stage.

    2. Since they did not enable WD, so they did not clear the WD. As I mentioned: they observed in the map file that if address in "ENTRY POINT SYMBOL: "_c_int00" address: 00083e24" is ended by a odd number. The execution is failed. If the address is ended with even number, the execution will be successful.

    3. How will the address and type of the two variables influence the power up routine?

    Thanks Vivek
  • Hi,

     1. The disable code is not in main function. We disabled the watchdog in "f28004x_codestartbranch.asm" to make sure the watchdog is disabled at the very early stage.

    Ok, that means program is able to jump to code_start but don't know if it's jumping to main or not, correct? Also does disabling the WD always helps or only in some cases? E.g. even when the two lines of code are included and address of _c_int00 is odd, disabling the WD resolves the issue?

     3. How will the address and type of the two variables influence the power up routine?

    It should not. Did you try running the same code with debugger connected? Basically in CCS, reset the device via CCS and then set the EMULATION BOOT to "BOOT TO FLASH" (refer the TRM) and then click on run button. This will help in debug.

    Regards,

    Vivek Singh 

  • 1. Yes, if we change the WD_DISABLE .set to 1 in codestartbranch.asm, the code always run successfully.

        But, they always have a watchdog disable code in InitSysctrl(), which seems cannot help as the code in codestartbranch.asm.

    2. Yes, with the debugger, the code can always run successfully.

    To conclude:

    1. If they only disable the WD in InitSysctrl(), the reset will happen if they have codes in their main loop. They tried several different codes. It seems the reset is related to the amount of the code, rather than type of the code.

    2. They reset does not happen with debugger.

    3. If we set the WD_DISABLE .set to 1 in codestartbranch.asm. Everything is well.

    Our customer is anxious about why the disable in codestartbranch.asm works, while the operation in InitSysctrl() cannot work.

  • Hi team,
    You got any follow up on this issue?