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.

EK-LM4F120XL Generating a reset by the debugger

Hello,

I am a new TI product user.

I use a EK-LM4120XL rev B with LM4F120H5QR processor and I am on Code Compose Studio 5.5.0.

I would like to generate a reset with CCS such as pushing RESET button down.

Nothing happens and there is no signal on the oscilloscope.

Could someone please give me some helps ?

#include "inc/hw_memmap.h"
#include "inc/hw_types.h"
#include "driverlib/sysctl.h"
#include "driverlib/gpio.h"

int main(void)
{
SysCtlClockSet(SYSCTL_SYSDIV_5|SYSCTL_USE_PLL|SYSCTL_XTAL_16MHZ|SYSCTL_OSC_MAIN);
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOA);
GPIOPinTypeGPIOOutput(GPIO_PORTA_BASE, GPIO_PIN_6);

GPIOPinWrite(GPIO_PORTA_BASE, GPIO_PIN_6, 0x00);  // RESET 
SysCtlDelay(2000000);
GPIOPinWrite(GPIO_PORTA_BASE, GPIO_PIN_6, 0xFF);  // Stop RESET
SysCtlDelay(2000000);

}

  • Hello Raphael,

    If I understand the code that you have, you would want to use PA6 to be connected to the RESET pin of the uC and when the program executes, it will reset itself and start over again?

    Regards

    Amit

  • Rapha��l Jost said:
    Nothing happens and there is no signal on the oscilloscope.

    Once you order PA_6 into output mode - does it not (normally) come up with output low?  And - if that's true - have you not forced the MCU into a Reset Condition?   Thus - your program can never proceed once this point in your code is reached.

    A far more "verifiable" code block would see PA_6 turn an Led on - shortly after program run.  Only then would I suggest some "Reset attempt."  If successful - that Led should come on again - proving that the MCU did reset...

    Your post would benefit from more detail - it's possible that you seek to issue a reset command via ICDI - yet the 3rd "Reset Condition" w/in your post states that - under CCS - this may not be possible...

  • Hello cb1,

    Without a clear intent the code is a self looping code... Unless the poster wants to control the Reset of one launchpad with another launchpad's GPIO.

    Regards

    Amit

  • Amit Ashara said:
    Without a clear intent the code is a self looping code...

    I'd bet that a better description of that code is, "An unintended/unwanted, self-looping code block."

    And - if one really wants to employ GPIO to, "trip Reset" - is not setting that GPIO as, "Open Drain" more customary?  This holds true whether Reset from the same MCU or one external...

    I stand by the advice to employ several Led "blinks" - very early in the code - to confirm any, "Unintended/unwanted MCU Resets..."  (as well as confirming that - "all has (at least) started well...")