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.

CPU will not boot after power up

Other Parts Discussed in Thread: TMS320F2810

This project won't boot after a power cycle.  I was developing the code which started from several example projects running from RAM but am at the point I need to run from FLASH, and after following information in SPRA958d-1.pdf am able to run from flash in the CCS 5.5 but if I detach CCS and power cycle the board, it just sits there.  Attached is the map file.

The map file shows the start address:

ENTRY POINT SYMBOL: "_c_int00"  address: 003e8715

and if I understand correctly, after a power up the processor should start executing at address: 0x3f7ff6

and at this address there is a LB 003e8715 from looking at the dissasemby window.

(by the way, I can only look at disassembly after I start a debug session, but that always does a download, I'd rather look at disassembly after a power cycle to be sure there truely is what I think in flash.  Is there a way to start debugging without a download?)

This board had been in our products for years and has had other code booting from powerup, and the jumper is correctly set for booting from flash.

What could be preventing the boot?desulf.m4p

  • Actually I just noticed my stuff coming out of the SCI port, which means most of the code is in fact running, the LEDs where not flashing so I assumed nothing was working, so it means the SPI code probably is not working(which talks to the device with LEDs). Maybe I have something in the CMD file assignments that broke the SPI interface, or something related.
    I'll take another look and report what I find.
  • Hi Dan,

    It is good you are getting something working and in fact booting to flash.

    After booting to flash, you can connect the CPU to CCS via JTAG and start debugging without actually programming the flash application again and resetting the CPU. You can Load Symbols and see what the CPU is doing/executing. In the CCS debug window, go to Run->Load->Load Symbols, and load your .out file. This will load the symbols without programming flash and resetting the device.

    Best Regards,
    sal
  • Sal, Thanks for the good info.

    But as it turns out my software works from flash sometimes but not every time. I'm not sure why, I'm still investigating.

    Is it possible that the speed of the slower flash is related to the problem?

    This is a simple test program that does not have time critical areas yet, there is an EV timer interrupt but if the timing changes it's ok, even if it occurs 50% off I'll tweak the counter for now I guess. Someone here said I might need wait states to run from flash, I'm looking at the SPRA958.pdf doc and Example_281xFlash.c to try to understand this.

    Any comments would be appreciated.
  • Dan,

    It can be that you have not configured wait states properly, although I am not sure that is the problem since it works with JTAG connected and doesn't work in standalone. Have you run straight through the whole program with the debugger connected or did you set breakpoints and step through the code to check for correctness?

    The depending on the speed of your SYSCLK, you may need to configure waitstates between the Flash Pump and CPU. The Flash pump typically runs slower than the SYSCLK and therefore the CPU must wait a few cycles when reading from the Flash. The device's reference manual will have more information about the necessary wait states.

    What device are you using?

    sal
  • I pulled my code back into ram, just to get it working again and to proceed to move into flash more carefully. 

    I'm using CCS5.5 with a TMS320F2810 processor.

    (actually I realized it has a stack corruption problem, which was even more of a reason to go back to RAM until that's fixed)


    The question of needing waits or not seems not well defined, let me ask this: if we consider a simple/safe random selection of program instructions, will the processor need wait state to access them correctly from flash?   If a region of memeory is chosen to need wait states, how is this specified in the .cmd file?

  • You can increase your stack size using CCS. Go to Properties -> C2000 Linker -> Basic Options and increase the stack size.

    Yes, you will need to configure the wait states when running from flash because of the reasons mentioned above. You do not specify the wait states in the linker command file but configure the wait states in the Flash Registers. The CPU will write to these register like any other module and configure the wait states.

    Please see: Section 4.4 of www.ti.com/lit/spra958
    Please see the C2000 Wiki page:
    processors.wiki.ti.com/.../FAQs;tisearch=Search-EN

    sal