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.

TMS320F280025: Software does not run after a Reset or Powerup

Part Number: TMS320F280025
Other Parts Discussed in Thread: UNIFLASH, C2000WARE

Dear Team,

I am able to compile my application on Debug and Release mode and flash it. I get the software running as expected in the debug session as well as the first time i flash the release version through uniflash.

If i trigger a manual hardware reset, or a power down and up the software seems to be blank and not running. Could you please help here if i miss something ?

And i am not a pro in editing the linker cmd files, i could have messed something here as well and would require your support to see if the used file "28002x_flash_api_lnk.cmd" really makes sense. 

Code Link: https://drive.google.com/file/d/1eaS0wdvwy-eaq297uyui1zk2ND3DfbIB/view?usp=sharing

  • Hello Surya,

    Looking at your source code, I do not see the f28002x_codestartbranch.asm file. This is the file that contains the code entry point and is placed in the BEGIN memory section. Without this, there is no instruction at the start of the flash telling the CPU to branch to your code init/main function. It would work fine when you debug because the debugger is directly writing the entry point address to the CPU program counter, but in standalone mode, the CPU will start at address 0 of the flash; there needs to be an instruction there that branches to _c_int00. You can find this file in any of the C2000ware example projects.

    Best regards,
    Ibukun

  • Hi Ibukun,

    Great this worked out, just added this asm file to my project and it works.

    Just  a new strange problem i see now, the application is terribly slow after a reset where the SW boots from this asm.

    Meaning while in debug session the application startsup in 1 sec approx, and my peripherals run in the desired clock rate as set. But on a reset or power up the application takes atleast 10seconds to start and the SPI display refresh rate is too slow compared to the same software running on debug mode.

    Is there some trick i miss here that i should take care of while using the  f28002x_codestartbranch.asm ?

    Thanks

    Surya

  • Hi Team,

    Made a measurement here, and i notice the code execution time increased by a factor of 6 after a Reset compared to the same on the debug mode.

    Measured the system clock "SYSCTL_CLOCKOUT_SYSCLK" on a GPIO and its the same 80Mhz on the debug as well as standalone mode. Not sure what makes this difference with the same code running on standalone and debug mode ?

    Thanks

    Surya

  • Surya,

    I don't know what the details of your external peripheral code are. But one thing I would do is check the peripheral clock divider (LSPCLK). You can also measure this either using an external oscilloscope or using the DCC module. As long as the clock configuration is the same, there should be no difference in execution speed between standalone and debugger mode.

    Best regards,
    Ibukun

  • I doubt its something to do with the asm file taken from the examples

    flash_kernel_ex3_codestartbranch.asmf28002x_codestartbranch.asm

    I just had a simple while loop code to toggle an IO which i tried on debug and standalone modes.

    while(1)
    {
    tmp = 8000;
    while(tmp > 0) tmp--;
    
    GPIO_togglePin(IO_ErrorLED);  
    GPIO_togglePin(IO_SystemLed);
    }

    Toggle time Trial with "f28002x_codestartbranch.asm" - Debug mode (370ns), Standalone (1.5us)

    Toggle time Trial with "flash_kernel_ex3_codestartbranch.asm" - Debug mode (370ns). Standalone (12.7us)

    Could it be the case that the codestart asm is missing some initialisation which the debugger does it right in the debug mode ?

  • Hello Surya,

    Let me consult with some of our other experts on this topic. Kindly bear with me and I will get back to you.

    Best regards,
    Ibukun

  • Hi Ibukun,

    Sure looking forward for your support here.

    Addon info, i tried to run the GPIO sample code on both RAM and FLASH. I see the same performance issue while running on debug session vs standalone.

    Hope this should be reproducible from your side as well with the attached asm file from my above post.

    For Ref: i have my complete software here as well if it helps to find the problem

    Code Link: https://drive.google.com/file/d/1eaS0wdvwy-eaq297uyui1zk2ND3DfbIB/view?usp=sharing

    Thanks

    Surya

  • Hi Suraya,

    Thank you for your patience.

    We're working on this. One of  our experts is going to provide you a solution soon.

    Regards,

    Hadi

  • Dear Team

    Do we have any news here maybe ?

    Thanks

    Surya

  • Hello Surya,

    Thank you for bearing with us.

    Can you please check the boot configuration and verify that they are set up correctly?

    For more details on how to configure these custom boot options, see Device boot modes section of ROM Code and Peripheral Booting chapter of the device-specific TRMs. For an example on how to configure boot pins, a custom boot table, and use expanded boot options, see the boot_ex2_customBootConfig project under F28004x in C2000Ware.

    Regards,

    Hadi

  • Hello Hadi,

    Thanks for your suggestions, I made a try to set the Boot modes based on the example but the base problem still persists. I tried both ways

    - Standalone mode and 0 boot mode to boot directly from FLASH alone "configBMSPS0" 

    The run time issue still exists on a reset. It would really be helpful if you can provide a working software example with the proper boot asm and the required boot settings that runs properly in the standalone mode ?

    Thanks,

    Surya

  • Hello Surya,

    I'm working on this issue. I'll consult with our experts and get back to you soon.

    Regards,

    Hadi

  • Hello Hadi,

    Sorry to disturb, i know that there are some holidays in between but do we have any news here ?

    We are in a tight situation where we have to solve this standalone run time issue which is very critical before releasing our products.

    Thanks

    Surya 

  • Hello Surya,

    I just noticed something in your source code that I did not see before. In your build that you program to flash, do you have _FLASH defined either in the build options or in one of your header files? I see that the Flash initialization/wait states etc. is dependent on this symbol.

    Best regards,
    Ibukun

  • Thanks a lot Ibukun!.

    This worked out. I defined _FLASH and i see a lots of Flash_* calls enabled from device.c

    Tested the code now and the get the same best run time performance in the standalone mode

    Thanks for your great support

    Surya.