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.

TMS570LC4357 Power Up issue

Other Parts Discussed in Thread: TMS570LC4357, HALCOGEN

I don't know whether the title's summarized my problems.

I am using TMS570LC4357. When I loaded the code thru JTAG (with CCS 6.1) into my board, then ran the code.  The code was running perfectly. 

Next, I clicked on "Terminate" button, then unplug the power-> plug in power again to start the board. The TMS570LC4357 can't start up properly. ( I set a pin to HIGH in main(), but it never shows HIGH in my scope).


I don't know why...Can you shed some light?

  • Did you use HALCoGen to setup the device? Did you make any modifications to the link command file? Is your program linked to run in the flash? Perhaps you can attach the .map generated by the linker.
  • Hi Bob,

    Yes, I did use the HalCogen.

    The problem originated from my using the watchdog timer. I cut in some dwd settings registers in the "USER CODE" session. During the test, I found the issue.

    Now, I commented out all my cut in "watchdog settings" but the problem persisted.

    I didn't modify the link command file..

    Here is the map file attached.

    6765.MyTest.map.txt

    Thanks

  • You must have exception vectors at location 0. The linker map does not look like it used the link command file from HALCoGen. Is there supposed to be a bootloader that transfers execution to your program? When you use the debugger to load your code, it sets the PC to the entry point of the code. That is why it works with the debugger. When you run without the debugger the CPU starts from reset by executing the instruction at location 0. If you do not have instructions there, your code will not startup.
  • Hi Bob,


    Thanks for your answer.


    May I know how to add such "executing instruction at location 0 to make the code jump to the entry point of the code"? Is there anyway that I could add a few lines somewhere in the code to make it happen?

    This legacy code once worked with reset. It is when I tried to test watchdog settings in the code and then the problem popped out. Now, even if I use the original code (without watchdog settings), the problem still persists. No matter what, if I want to test the watchdog function, I still need to make sure that the code could jump to the entry point to start after watchdog reset....So, please give me some ideas of how to set the code to jump to the entry point at the location 0, maybe by adding a few lines at somewhere in the code(?)

    By the way, there is linker cmd file is used in HalCogen. I attached it here for your reference.


    Thanks a lot again for help!

    1321.HL_sys_link.cmd.txt

  • It looks like there was a boot loader in the device originally. Perhaps you accidentally erased the bootloader when you flashed the application code.  The linker command file you attached has been greatly modified. The VECTORS memory section has been commented out. I think you need to reprogram your company's bootloader and then when you program your application code, make sure you do not erase the bootloader.

    Once you get the bootloader reprogrammed into your device. Change the flash settings so you don't erase the first 4K of flash.

  • Hi Bob,

    Thanks again for your help.

    Unfortunately, after trying the settings in on-chip flash, the problem still persists:

    I loaded bootloader first, then the application code-> After the code was loaded from JTAG, I checked the on-chip flasher that the Sector0 - 3 in Bank 0 were not selected ->Run the code, the DSP worked fine. -> Click "terminate" button -> Recycle the power - > the problem was still there (The DSP can't start itself ....)

    It is really weird. BTW, I flashed the code into the board many times. Each time when I loaded application code, I erased "entire flash", which never affected code running even after several power cycles...I don't know why...

    Many thanks, again!

  • Using CCS, can you verify with a memory dump that their is code at locations 0? (See example below:)

  • Hi Bob,

    Here is what I have

    Thanks a lot!

  • Hi Bob,

    I looks that at  addr 0, there is code there.

    Could my problem be caused by bootloader failing in fetching application code into the "code's entry point"?  Is there any way that I can put some instructions in my code that each time during reset, the code could jump to the entry point to make the chip start?


    Thanks a lot!



  • I reloaded the bootloader with my application code was in the chip. It works now....I really don't know why...I tried it before but it didn't work. Maybe I missed some parts before.


    Anyway, Bob, thanks a lot for your great help!