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.

Compiler/DK-TM4C129X: TIVA C reset

Part Number: DK-TM4C129X

Tool/software: TI C/C++ Compiler

Hello,

Iam using  DK-TM4C129X (Tiva Launch Pad) and my program works fine in normal conditions, but I have to  push the 'reset' button on the Launch Pad every time power is disconnected and reconnected. Because the interrupts seems not to work when power is reconnected. but the main() routine seems to continue without the interrupts.

I am using tivaware_c_series_2_1_4_178.

I'd like to know the actual function of the 'reset' button on the Pad and is there a soft reset function which I can use in the main routine to enable the interrupts on power reset.

(

i have tried

HWREG(NVIC_APINT) = NVIC_APINT_VECTKEY | NVIC_APINT_SYSRESETREQ;

SysCtlReset();

IntMasterEnable();

Seems to have no effect

)

How can I fix this?

Thanks in advance.

  • The design kit should start executing your code from power on. If it requires you to press the reset button after power-on there is likely a dependency on some external signal that is not in the correct state at power-on. Is something else being powered on at the same time? I suspect the difference between the software generated reset and pressing the reset button is the amount of delay time after power on. I suggest we identify the root cause of the startup issue instead of trying to work around it with a software reset.
  • Thank you.
    Yes, I am powering a GPS module with the same power supply. But it seems it works fine at power on. My code depends on a UART interrupt from the module and a GPIO interrupt from the launchpad, however when I power on the system none of the interrupts (not even the timer interrupts) work. when I press the reset button the system starts to work normal. Is there any documentation on the function of the reset button on the design kit. I could not find much details on the Tiva™ TM4C129X Development Board
    User's Guide.
  • The schematic of the DK-TM4C129x is in appendix D of: http://www.ti.com/lit/ug/spmu360a/spmu360a.pdf

    The RST pin of the TM4C129X device (P18) is tied to a 10K pullup resistor. The RESET switch shorts this pin to ground. The behavior of the RST pin is described on page 235 of the datasheet: http://www.ti.com/lit/ds/symlink/tm4c129xnczad.pdf#page=235

    From an application's view, the default behavior of the RST pin is the same as a power on reset. Therefore I strongly suspect the issue you are seeing is the difference in timing. I suspect that after a power-on, the TM4C starts executing before the GPS module is ready and the code either tries to initialize the GPS before it is ready, or gets stuck in some loop because the GPS signals were not in the expected state.  You can configure CCS so that it does not automatically connect to the target when it is launched and that it does not reset the device when it connects. This way you can start CCS, launch the target configuration, then power-on the system. Then you can connect and it will halt the CPU where it is. You can load symbols (not reprogramming the flash) to help identify where in the code the CPU is stuck.