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.

RTOS/TM4C1294NCPDT: Software Reset/Reboot functionality feature in TI-RTOS

Part Number: TM4C1294NCPDT


Tool/software: TI-RTOS

Hello , 

I am developing an application using TM4C1294NCPDT and TI-RTOS. This application require to process a command for software reset and software reboot. I explored about software reset  and I found there is a API in TIVA driver ibrary , void SysCtlReset(void).


please guide for TI-RTOS based software reset and software reboot.

  • Hello Nike,

    From what I can see, TI-RTOS does not have device reset APIs.

    So you would want to use the TivaWare API you already found to do the Reset, and the RTOS should re-initialize afterwards without issue. If that isn't working well, let me know and I'll pull in an RTOS expert to comment.

  • its not working

  • Nike,

    nike. said:
    its not working

    Can you give more details? 

    Todd

  • Hi Todd,

         In ti-rtos i used SysCtlReset() api . but when it enters to boot.asm it stuck there.  I need to run that code again to start execution .  

  • Nike,

    Could CCS be interfering with it. I imported the GPIO Interrupt TI-RTOS example. I had the  gpioButtonFxn1 function call SysCtlReset(). I disconnected CCS and power cycled the board. Button0 toggled the LED as expected. Button1 reset the target. I confirmed that Button0 still toggled the LED as expected.

    Todd

  • can you post example code for software reset.

  • I have a debugger attached, software reset is usually trapped by the debugger, and the target will be halted.   have to tell the target to continue from the debugger. how to resolve these issue ?

  • I just added SysCtlReset() into gpioButtonFxn1.

    void gpioButtonFxn1(unsigned int index)
    {
        /* Clear the GPIO interrupt and toggle an LED */
        GPIO_toggle(Board_LED1);
    
        if (count++ == 100) {
            count = 0;
        }
        SysCtlReset();
    }

    nike. said:
    I have a debugger attached, software reset is usually trapped by the debugger, and the target will be halted.   have to tell the target to continue from the debugger. how to resolve these issue ?

    I've asked someone from the CCS team to answer this.

    Todd

  • Hi,

    nike. said:

    I have a debugger attached, software reset is usually trapped by the debugger, and the target will be halted.   have to tell the target to continue from the debugger. how to resolve these issue ?

    At what point is the software trapped after reset? Does it halt at main? 

    If I understood correctly, it seems you need to leave the software running after connecting to or resetting the core. If so, you can try to enable the option Auto Run but leave the symbol field blank. It should automatically start running the target after a connect but will not halt anywhere. 

    This is described in section 7.2.5 of the CCS User's Guide - if you have CCSv9.1 you can access it via the CCS Help. Alternatively you can access it at:

    http://software-dl.ti.com/ccs/esd/documents/users_guide/index.html 

    Hope this helps,

    Rafael

  • hi Todd

            Here problem is that when we press the switch (intrupt based) that time we need to again run the program then only program start execution from main function. then again if i press the switch then again. i need to run the program it cycles continues. in these process program is stucking at boot.asm.

    expected ouyput is :-

                        when we press the switch that time program need to execution start from main. no need to run again. how many times we press the switch auto matically program need to start from main function. reboot.zip

  • Hi,

    Sorry, but I am really unsure what you mean about the functionality. If I understood correctly, the moment you press the switch in your system, the device goes to reset and the debugger halts its execution at boot.asm, right? 

    If so, try the method I mentioned in my post above to remove the Auto Run feature, but this time also enabling the option On a Reset. This will cause the processor to run freely after a reset. 

    The major drawback to this approach is that you will not capture what it seems to be a catastrophic event - i.e., your code seems to be failing to properly work, resetting the device after a normal operation (clicking the switch). 

    Regards,

    Rafael

  • can anyone post sample project tar file for software reset in ti-rtos for tm4c1294ncpdt .  

  • Hi,

    Thanks for sending the project; I now understand what you meant by your reset issue. 

    The USR SW1 button causes the processor to print the message "Reset about to occur" and then you expect the processor to automatically restart operation without halting and displaying the message "Starting the example.", right? 

    When using the ICDI, I see the same behaviour as you: the processor is halted at _c_int00 (boot.asm) after the reset happens. 

    However, when I am using an external Debug Probe (XDS110) the processor is not halted at _c_int00 and the message "Starting the example." is properly displayed. 

    Therefore, it seems the ICDI interface has a hardwired setting on its implementation that is halting the core at reset (there are no configurable options on the ICDI). 

    In this case, your alternative is to get an external Debug Probe. The code works fine. 

    Hope this helps,

    Rafael