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.

when I power reset, program not run like first i burn in.



#include <stdbool.h>
#include <stdint.h>
#include "driverlib/debug.h"
#include "driverlib/gpio.h"
#include "driverlib/pin_map.h"
#include "driverlib/rom.h"
#include "driverlib/ssi.h"
#include "driverlib/sysctl.h"
#include "driverlib/uart.h"
#include "inc/hw_ints.h"
#include "inc/hw_types.h"
#include "inc/hw_memmap.h"
#include "utils/uartstdio.h"


char *pcChars = "KKKK";
char i;
//*****************************************************************************
//
// The error routine that is called if the driver library encounters an error.
//
//*****************************************************************************
#ifdef DEBUG
void
__error__(char *pcFilename, uint32_t ui32Line)
{
}
#endif
void
ssiconfigure(void)
{
ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_SSI0);
ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOA);
ROM_GPIOPinConfigure(GPIO_PA2_SSI0CLK);
ROM_GPIOPinConfigure(GPIO_PA3_SSI0FSS);
ROM_GPIOPinConfigure(GPIO_PA4_SSI0RX);
ROM_GPIOPinConfigure(GPIO_PA5_SSI0TX);
ROM_GPIOPinTypeSSI(GPIO_PORTA_BASE, GPIO_PIN_5 | GPIO_PIN_4 | GPIO_PIN_3 |
GPIO_PIN_2);
ROM_SSIConfigSetExpClk(SSI0_BASE, SysCtlClockGet(), SSI_FRF_MOTO_MODE_2,
SSI_MODE_MASTER, 2000000, 8);
ROM_SSIEnable(SSI0_BASE);
}
main(void)
{
i=2;
//int32_t i32Idx;
ROM_SysCtlClockSet(SYSCTL_SYSDIV_1 | SYSCTL_USE_OSC | SYSCTL_OSC_MAIN |
SYSCTL_XTAL_16MHZ);
//
//configure ssi interface
//
ssiconfigure();
//i32Idx = 0;
while(1)
{
ROM_SSIDataPut(SSI0_BASE, pcChars[i]);
SysCtlDelay(SysCtlClockGet() / 1000);
}

}

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

this is a simple program,but my question is when i press restart button or power reset ,

the program will stop, untill  i burn it again that will working. but i really burn it to flash.

why it's not work when i restart ?

I am use "TM4C123G LaunchPad"  

  • Yun,

    Have you been able to reproduce this behavior with a different piece of code - maybe a blinky?

    Have you been able to reproduce this behavior with another TM4C123 launchpad with the same code? 

    Can you tell more about your arrangement? What are you sending the data to? What about clock settings on the other side? Why are you not checking before every transmit if you/the receiver are ready to send/receive another buffer out?

    Regards,

    Shashank

  • yun said:
    this is a simple program,but my question is when i press restart button or power reset ,

    the program will stop, untill  i burn it again that will working. but i really burn it to flash.

    why it's not work when i restart ?

    The problem might be there is nothing in your project which sets the interrupt vectors in flash. See stellaris launchpad not running after reset for more details.