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.

C6455 software reboot

 hello, everbody~

C6455,using EMIF to boot.

after app started , Is there any methods ,using C code , to reboot without power restart.

  • Generally speaking, yes, it is possible to replace running program on the run. Details would depend on your actual environment. I used software reboot on C6414/16, which were booting from ROM over EMIFB. We used DSP/BIOS application and had dedicated section for bootloader.

  • First of all, thank you very much.

    In my app, I also used DSP/BIOS and had a bootloader.

    you said : it is possible to replace running program on the run. what's your methods?

  • Limei,

    Since you are using EMIFA boot, you could simply branch or call EMIFA CE3 space at 0xB0000000. This is apparently where you have a bootloader located, and it would start running from that location.

    Or if you just want to do a Restart you can branch/call c_int00 (_c_int00 in assembly).

    Regards,
    RandyP

     

  • thank you RandyP .

    you said  : you could simply branch or call EMIFA CE3 space at 0xB0000000. This is apparently where you have a bootloader located, and it would start running from that location.

    My app were wrote by C code ,i don't know how to branch to address 0xB0000000. can you tell me ? Embed assembly language ?

    expect your reply~

  • You may use something like following:

    typedef  void (*pFunction)(void);
    pFunction Jump_To_Application;

    Jump_To_Application = (pFunction) 0xB0000000;
    Jump_To_Application();
  • thanks rrlagic .

    I will try this method.

    but I still have a question : using EMIF boot mode, C6455 will copy first 0x400 form flash to internal ram .Should i jump to that address instead of 0xB0000000 .

  • Greetings,

    Details would depend on your objectives. Also I don't want you to understand my suggestions as directions, because I gathered my experience with different DSP, C6414.

    So again, your device is copying 1K of code from EMIF to origin of internal memory and starts executing that code. Usually we place a bootloader there, so it loads the rest of the application. Sometimes that 1K of memory reused after startup, sometimes left intact. So if you still have bootloader at internal memory, then you can jump to it and restart your application. You may have more than one application to run, thus you may want tell bootloader which one to load. We used predefined memory location in the flash to let loader know. You may design your own solution.

    I also suggest to disable all interrupts before loading process. If EMIF configuration changes in application, you may nee to configure it in loader as well.

  • Limei,

    For reasons of each DSP designer or targeted market, we change things like boot modes. You will always want to make sure the bootloader document you are reviewing is the latest revision and is specific to the device you are using.

    The C6455 EMIFA bootloader simply branches to 0xB0000000 and begins executing, there is no copy of any amount of code from there unless you put that there. There may be secondary bootloaders offered by TI or others that do that for convenience, but it is not the operation of the C6455 bootloader.

    The code that rrlagic offered should duplicate the operation of the bootloader, and the recommendations in the post above are important considerations that need to be considered, depending on your system operation.

    Regards,
    RandyP

  • thank you very much.

    I will download the latest C6455 datasheet and check .

    you said : The code that rrlagic offered should duplicate the operation of the boot loader, and the recommendations in the post above are important considerations that need to be considered, depending on your system operation. if i use the code that rrlagic offered ,what aspects should i consider? i have tried that code yesterday, my app just  halted, i don't  know why.

  • Limei,

    A nice function of the forum editor is the red Quote button at the bottom left of the text box above the editor box. If you select a portion of text in the previous post, which is shown above your editor box on the forum, you can then click that red Quote button and that selected text will be quoted in your reply in a box. Just FYI. For example:

    limei meng said:
    if i use the code that rrlagic offered ,what aspects should i consider?

    When the DSP comes out of reset, it has been initialized in many ways. The EMIF registers are at particular values as shown in the EMIF User's Guide. Then the DSP will branch to 0xB0000000 and start executing from your external non-volatile memory. If your system does something that changes the state of the DSP or the EMIF or the external memory, then those states would not be the same as it was after a reset. If any of that matters, then you will have to consider it and adapt or account for it. I will not be able to list every possible thing that could go wrong in your system, but you know what happens in your system so your list is much shorter than the list of everything.

    limei meng said:
    i have tried that code yesterday, my app just  halted, i don't  know why.

    This is an excellent time to use the CCS debugger and figure out what is going wrong. Put a breakpoint at the call Jump_To_Application and then single-step. The code at 0xB0000000 is probably assembly, so you will need to do an 'assembly single-step into' operation. Or when it hangs, halt it and see where it is and what it is doing, then you can deduce a cause, perhaps.

    Regards,
    RandyP

  • RandyP,

    RandyP said:
    A nice function of the forum editor is the red Quote button at the bottom left of the text box above the editor box. If you select a portion of text in the previous post, which is shown above your editor box on the forum, you can then click that red Quote button and that selected text will be quoted in your reply in a box.

    :)thank you very much, this function is very useful.

    I know what you mean and will try to debug it.

    Regards,

    limei

  • Limei,

    Please let us know what you learn. If you find a specific problem, then we will try to help you.

    Regards,
    RandyP