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.

TM4C1290NCPDT: Callback function not being called

Part Number: TM4C1290NCPDT

CCS 7.2.0.00013

TivaWare_C_Series-2.1.4.178

Compiler TI v16.9.6.LTS

The application I'm working on uses a Systick timer scheduler. The callback function SysTickTimer_Scheduler is not being called.

main.c

 TickTimer_CfgFnct(TICKTIMER_SCHEDULE_MOTOR_COMMAND_CHECK, (void*)&SysTickTimer_Scheduler, (void*)TICKTIMER_SCHEDULE_MOTOR_COMMAND_CHECK);

 void SysTickTimer_Scheduler(int iFunctionId)


TickTimer.c
 void  TickTimer_CfgFnct (uint8_t n, void (*fnct)(void *), void *arg)

TICKTIMER_SCHEDULE_MOTOR_COMMAND_CHECK = 2.

What part of the tm4c1290ncpdt_startup_ccs.c does this correspond to?

When I step through the code, the address of SysTickTimer_Scheduler function is one less

than the address being passed into the TickTimer_CfgFnct function. I don't why these two

aren't identical.

Thank you for your pointers.

Priya

  • Hi,
    Your question is not clear to me. Where did you find ysTickTimer_Scheduler? I don't think this comes from the TivaWare library.
  • The function is part of the application. In the startupccs.c file, the interrupt for the SysTick module is setup. I have not read this part of the tiva datasheet yet, it seems like it arbitrates timer scheduling. This is a project ported from Stellaris code.
    Thanks,
    Priya
  • Is this a application you create or from someone? I don't recognize such a startup_ccs.c that is automatically created in CCS when you define a device. I think your startup_ccs.c must have been modified from the default version.
  • I'm currently not in front of my office computer. When I say startupccs.c, I mean the tm4c... Startup file. The Stellaris code is in production. I am porting to tm4c. I have modified the Stellaris code files, I didn't forget the startup file. The SysTick interrupt or the associated timer interrupts are not firing and I need help tracking this down.

    I appreciate any insight.

    Thanks,

    Priya

  • Hi Priya,
    Can you show your LM startup file code? The startup_ccs.c code normally stores the interrupt vectors only. In order to use the SysTick interrupt you need to enable the interrupt and set up the period of the timer. Below example shows how to setup a 1 second SysTick timer in the application code.

    SysTickPeriodSet(ui32SysClock);
    IntMasterEnable();
    SysTickIntEnable();
    SysTickEnable();
  • //*****************************************************************************
    //
    // Startup code for use with TI's Code Composer Studio.
    //
    // Copyright (c) 2011-2014 Texas Instruments Incorporated.  All rights reserved.
    // Software License Agreement
    // 
    // Software License Agreement
    //
    // Texas Instruments (TI) is supplying this software for use solely and
    // exclusively on TI's microcontroller products. The software is owned by
    // TI and/or its suppliers, and is protected under applicable copyright
    // laws. You may not combine this software with "viral" open-source
    // software in order to form a larger program.
    //
    // THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS.
    // NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT
    // NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
    // A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. TI SHALL NOT, UNDER ANY
    // CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL
    // DAMAGES, FOR ANY REASON WHATSOEVER.
    //
    //*****************************************************************************
    
    #include <stdint.h>
    #include "inc/hw_nvic.h"
    #include "inc/hw_types.h"
    
    //*****************************************************************************
    //
    // Forward declaration of the default fault handlers.
    //
    //*****************************************************************************
    void ResetISR(void);
    static void NmiSR(void);
    static void FaultISR(void);
    static void IntDefaultHandler(void);
    void MemManage_Handler(void);
    void BusFault_Handler(void);
    void UsageFault_Handler(void);
    void SysTickHandler(void);
    void SVC_Handler(void);
    void PendSV_Handler(void);
    void DebugMon_Handler(void);
    
    
    //*****************************************************************************
    //
    // External declaration for the reset handler that is to be called when the
    // processor is started
    //
    //*****************************************************************************
    extern void _c_int00(void);
    
    //*****************************************************************************
    //
    // Linker variable that marks the top of the stack.
    //
    //*****************************************************************************
    extern uint32_t __STACK_TOP;
    
    //*****************************************************************************
    //
    // External declarations for the interrupt handlers used by the application.
    //
    //*****************************************************************************
    // To be added by user
    extern void UARTprintf(const char *pcString, ...);
    extern void SENSOR_TimerISR(void);
    extern void ROTARY_MotorPWMTimer_ISR(void);
    extern void ROTARY_MotorTimer2_ISR(void);
    extern void LINEAR_MotorPWMTimer_ISR(void);
    extern void LINEAR_MotorTimer2_ISR(void);
    extern void CONT_TIMER_ISR(void);
    extern void WatchdogIntHandler_ISR(void);
    extern void THERMISTOR_ADC_Sampler_ISR(void);
    extern void SENSOR_ADC_Sampler_ISR(void);
    //extern void I2C_GPIO_Interupt_ISR(void);
    extern void I2C_CHIP1_GPIO_Interupt_ISR(void); // This is for reading REPM mechanical Switches
    extern void I2C_CHIP2_GPIO_Interupt_ISR(void); // This is for reading TFA reflective, move and stop sensors
    extern void I2C_ISR(void);
    extern void ARCNET_Interupt_ISR(void);
    extern void Switch_Interupt_ISR(void);
    extern void PRINTHEAD_ContLongTimer_ISR(void);
    extern void PRINTHEAD_ContShortTimer_ISR(void);
    extern void PRINTHEAD_PWRControlISR(void);
    extern void USB0DeviceIntHandler(void);
    extern void x_Int_TPU0A( void );
    extern void x_Int_TPU1A( void );
    extern void x_Int_TPU2A( void );
    extern void UART0_ISR (void);
    // Test code
    extern void SENSOR_TestTimerISR(void);
    
    //*****************************************************************************
    //
    // The vector table.  Note that the proper constructs must be placed on this to
    // ensure that it ends up at physical address 0x0000.0000 or at the start of
    // the program if located at a start address other than 0.
    //
    //*****************************************************************************
    #pragma DATA_SECTION(g_pfnVectors, ".intvecs")
    void (* const g_pfnVectors[])(void) =
    {
        (void (*)(void))((uint32_t)&__STACK_TOP),
                                                // The initial stack pointer
        ResetISR,                               // The reset handler
        NmiSR,                                  // The NMI handler
        FaultISR,                               // The hard fault handler
        MemManage_Handler,                       // The MPU fault handler
        BusFault_Handler,                      // The bus fault handler
        UsageFault_Handler,                       // The usage fault handler
        0,                                      // Reserved
        0,                                      // Reserved
        0,                                      // Reserved
        0,                                      // Reserved
        SVC_Handler,                     // SVCall handler
        DebugMon_Handler,                      // Debug monitor handler
        0,                                      // Reserved
        PendSV_Handler,                      // The PendSV handler
        SysTickHandler,                      // The SysTick handler
        IntDefaultHandler,                      // GPIO Port A
        IntDefaultHandler,                      // GPIO Port B
        IntDefaultHandler,                      // GPIO Port C
        IntDefaultHandler,                      // GPIO Port D
        IntDefaultHandler,                      // GPIO Port E
        UART0_ISR,                      // UART0 Rx and Tx
        IntDefaultHandler,                      // UART1 Rx and Tx
        IntDefaultHandler,                      // SSI0 Rx and Tx
        IntDefaultHandler,                      // I2C0 Master and Slave
        IntDefaultHandler,                      // PWM Fault
        LINEAR_MotorPWMTimer_ISR,                      // PWM Generator 0
        IntDefaultHandler,                      // PWM Generator 1
        IntDefaultHandler,                      // PWM Generator 2
        IntDefaultHandler,                      // Quadrature Encoder 0
        SENSOR_ADC_Sampler_ISR,                      // ADC Sequence 0
        IntDefaultHandler,                      // ADC Sequence 1
        THERMISTOR_ADC_Sampler_ISR,                      // ADC Sequence 2
        IntDefaultHandler,                      // ADC Sequence 3
        WatchdogIntHandler_ISR,                      // Watchdog timer
        ROTARY_MotorTimer2_ISR,                      // Timer 0 subtimer A
        LINEAR_MotorTimer2_ISR,                      // Timer 0 subtimer B
        SENSOR_TimerISR,                      // Timer 1 subtimer A
        IntDefaultHandler,                      // Timer 1 subtimer B
        PRINTHEAD_ContLongTimer_ISR,                      // Timer 2 subtimer A
        PRINTHEAD_ContShortTimer_ISR,                      // Timer 2 subtimer B
        IntDefaultHandler,                      // Analog Comparator 0
        IntDefaultHandler,                      // Analog Comparator 1
        IntDefaultHandler,                      // Analog Comparator 2
        IntDefaultHandler,                      // System Control (PLL, OSC, BO)
        IntDefaultHandler,                      // FLASH Control
        IntDefaultHandler,                      // GPIO Port F
        IntDefaultHandler,                      // GPIO Port G
        IntDefaultHandler,                      // GPIO Port H
        IntDefaultHandler,                      // UART2 Rx and Tx
        IntDefaultHandler,                      // SSI1 Rx and Tx
        PRINTHEAD_PWRControlISR,                      // Timer 3 subtimer A
        IntDefaultHandler,                      // Timer 3 subtimer B
        IntDefaultHandler,                      // I2C1 Master and Slave
        IntDefaultHandler,                      // CAN0
        IntDefaultHandler,                      // CAN1
        IntDefaultHandler,                      // Ethernet
        IntDefaultHandler,                      // Hibernate
        USB0DeviceIntHandler,                      // USB0
        ROTARY_MotorPWMTimer_ISR,                      // PWM Generator 3
        IntDefaultHandler,                      // uDMA Software Transfer
        IntDefaultHandler,                      // uDMA Error
        IntDefaultHandler,                      // ADC1 Sequence 0
        IntDefaultHandler,                      // ADC1 Sequence 1
        IntDefaultHandler,                      // ADC1 Sequence 2
        IntDefaultHandler,                      // ADC1 Sequence 3
        IntDefaultHandler,                      // External Bus Interface 0
        IntDefaultHandler,                      // GPIO Port J
        IntDefaultHandler,                      // GPIO Port K
        IntDefaultHandler,                      // GPIO Port L
        IntDefaultHandler,                      // SSI2 Rx and Tx
        IntDefaultHandler,                      // SSI3 Rx and Tx
        IntDefaultHandler,                      // UART3 Rx and Tx
        IntDefaultHandler,                      // UART4 Rx and Tx
        IntDefaultHandler,                      // UART5 Rx and Tx
        IntDefaultHandler,                      // UART6 Rx and Tx
        IntDefaultHandler,                      // UART7 Rx and Tx
        I2C_ISR,                      // I2C2 Master and Slave
        IntDefaultHandler,                      // I2C3 Master and Slave
        IntDefaultHandler,                      // Timer 4 subtimer A
        IntDefaultHandler,                      // Timer 4 subtimer B
        IntDefaultHandler,                      // Timer 5 subtimer A
        IntDefaultHandler,                      // Timer 5 subtimer B
        IntDefaultHandler,                      // FPU
        0,                                      // Reserved
        0,                                      // Reserved
        IntDefaultHandler,                      // I2C4 Master and Slave
        IntDefaultHandler,                      // I2C5 Master and Slave
        IntDefaultHandler,                      // GPIO Port M
        IntDefaultHandler,                      // GPIO Port N
        0,                                      // Reserved
        IntDefaultHandler,                      // Tamper
        IntDefaultHandler,                      // GPIO Port P (Summary or P0)
        IntDefaultHandler,                      // GPIO Port P1
        IntDefaultHandler,                      // GPIO Port P2
        IntDefaultHandler,                      // GPIO Port P3
        IntDefaultHandler,                      // GPIO Port P4
        IntDefaultHandler,                      // GPIO Port P5
        IntDefaultHandler,                      // GPIO Port P6
        IntDefaultHandler,                      // GPIO Port P7
        IntDefaultHandler,                      // GPIO Port Q (Summary or Q0)
        IntDefaultHandler,                      // GPIO Port Q1
        IntDefaultHandler,                      // GPIO Port Q2
        IntDefaultHandler,                      // GPIO Port Q3
        IntDefaultHandler,                      // GPIO Port Q4
        IntDefaultHandler,                      // GPIO Port Q5
        IntDefaultHandler,                      // GPIO Port Q6
        IntDefaultHandler,                      // GPIO Port Q7
        IntDefaultHandler,                      // GPIO Port R
        IntDefaultHandler,                      // GPIO Port S
        IntDefaultHandler,                      // SHA/MD5 0
        IntDefaultHandler,                      // AES 0
        IntDefaultHandler,                      // DES3DES 0
        IntDefaultHandler,                      // LCD Controller 0
        IntDefaultHandler,                      // Timer 6 subtimer A
        IntDefaultHandler,                      // Timer 6 subtimer B
        IntDefaultHandler,                      // Timer 7 subtimer A
        IntDefaultHandler,                      // Timer 7 subtimer B
        IntDefaultHandler,                      // I2C6 Master and Slave
        IntDefaultHandler,                      // I2C7 Master and Slave
        IntDefaultHandler,                      // HIM Scan Matrix Keyboard 0
        IntDefaultHandler,                      // One Wire 0
        IntDefaultHandler,                      // HIM PS/2 0
        IntDefaultHandler,                      // HIM LED Sequencer 0
        IntDefaultHandler,                      // HIM Consumer IR 0
        IntDefaultHandler,                      // I2C8 Master and Slave
        IntDefaultHandler,                      // I2C9 Master and Slave
        IntDefaultHandler,                      // GPIO Port T
        IntDefaultHandler,                      // Fan 1
        0,                                      // Reserved
    };
    
    //*****************************************************************************
    //
    // This is the code that gets called when the processor first starts execution
    // following a reset event.  Only the absolutely necessary set is performed,
    // after which the application supplied entry() routine is called.  Any fancy
    // actions (such as making decisions based on the reset cause register, and
    // resetting the bits in that register) are left solely in the hands of the
    // application.
    //
    //*****************************************************************************
    void
    ResetISR(void)
    {
        //
        // Jump to the CCS C initialization routine.  This will enable the
        // floating-point unit as well, so that does not need to be done here.
        //
        __asm("    .global _c_int00\n"
              "    b.w     _c_int00");
    }
    
    //*****************************************************************************
    //
    // This is the code that gets called when the processor receives a NMI.  This
    // simply enters an infinite loop, preserving the system state for examination
    // by a debugger.
    //
    //*****************************************************************************
    static void
    NmiSR(void)
    {
        //
        // Enter an infinite loop.
        //
        while(1)
        {
        }
    }
    
    //*****************************************************************************
    //
    // This is the code that gets called when the processor receives a fault
    // interrupt.  This simply enters an infinite loop, preserving the system state
    // for examination by a debugger.
    //
    //*****************************************************************************
    static void
    FaultISR(void)
    {
        //
        // Enter an infinite loop.
        //
        while(1)
        {
        }
    }
    
    //*****************************************************************************
    //
    // This is the code that gets called when the processor receives an unexpected
    // interrupt.  This simply enters an infinite loop, preserving the system state
    // for examination by a debugger.
    //
    //*****************************************************************************
    static void
    IntDefaultHandler(void)
    {
        //
        // Go into an infinite loop.
        //
        while(1)
        {
            UARTprintf("\n Default Interrupt Handler Encountered - Looping Endlessly\n");
        }
    }
    
    void MemManage_Handler(void)
    {
    
        while(1)
        {
            UARTprintf("\n Memory Management Handler Encountered - Looping Endlessly\n");
        }
    }
    
    void BusFault_Handler(void)
    {
    
        while(1)
        {
            UARTprintf("\n Bus Fault Encountered - Looping Endlessly\n");
        }
    }
    
    void UsageFault_Handler(void)
    {
    
        while(1)
        {
            UARTprintf("\n Usage Fault Encountered - Looping Endlessly\n");
        }
    }
    
    void SVC_Handler(void)
    {
    
        while(1)
        {
            UARTprintf("\n SVC Handler Encountered - Looping Endlessly");
        }
    }
    
    void DebugMon_Handler(void)
    {
    
        while(1)
        {
            UARTprintf("\n DebugMon Handler Encountered - Looping Endlessly\n");
        }   
    }
    
    void PendSV_Handler(void)
    {
    
        while(1)
        {
            UARTprintf("\n PendSV Handler Encountered - Looping Endlessly");
        }
    }
    
    //*****************************************************************************
    //   +--+       
    //   | ++----+   
    //   +-++    |  
    //     |     |  
    //   +-+--+  |   
    //   | +--+--+  
    //   +----+    Copyright (c) 2009-12 Code Red Technologies Ltd.
    //
    // Microcontroller Startup code for use with Red Suite
    //
    // Version : 120126
    //
    // Software License Agreement
    //
    // The software is owned by Code Red Technologies and/or its suppliers, and is
    // protected under applicable copyright laws.  All rights are reserved.  Any
    // use in violation of the foregoing restrictions may subject the user to criminal
    // sanctions under applicable laws, as well as to civil liability for the breach
    // of the terms and conditions of this license.
    //
    // THIS SOFTWARE IS PROVIDED "AS IS".  NO WARRANTIES, WHETHER EXPRESS, IMPLIED
    // OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
    // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
    // USE OF THIS SOFTWARE FOR COMMERCIAL DEVELOPMENT AND/OR EDUCATION IS SUBJECT
    // TO A CURRENT END USER LICENSE AGREEMENT (COMMERCIAL OR EDUCATIONAL) WITH
    // CODE RED TECHNOLOGIES LTD.
    //
    //*****************************************************************************
    #if defined (__cplusplus)
    #ifdef __REDLIB__
    #error Redlib does not support C++
    #else
    //*****************************************************************************
    //
    // The entry point for the C++ library startup
    //
    //*****************************************************************************
    extern "C" {
    extern void __libc_init_array(void);
    }
    #endif
    #endif
    
    #define WEAK __attribute__ ((weak))
    #define ALIAS(f) __attribute__ ((weak, alias (#f)))
    
    // Code Red - if CMSIS is being used, then SystemInit() routine
    // will be called by startup code rather than in application's main()
    #if defined (__USE_CMSIS)
    #include "system_LM3S.h"
    #endif
    
    //*****************************************************************************
    #if defined (__cplusplus)
    extern "C" {
    #endif
    
    //*****************************************************************************
    //
    // Forward declaration of the default handlers. These are aliased.
    // When the application defines a handler (with the same name), this will
    // automatically take precedence over these weak definitions
    //
    //*****************************************************************************
    void ResetISR(void);
    WEAK void NMI_Handler(void);
    WEAK void HardFault_Handler(void);
    WEAK void MemManage_Handler(void);
    WEAK void BusFault_Handler(void);
    WEAK void UsageFault_Handler(void);
    WEAK void SVC_Handler(void);
    WEAK void DebugMon_Handler(void);
    WEAK void PendSV_Handler(void);
    void SysTickHandler(void);
    WEAK void IntDefaultHandler(void);
    extern void UARTprintf(const char *pcString, ...);
    extern void SENSOR_TimerISR(void);
    extern void ROTARY_MotorPWMTimer_ISR(void);
    extern void ROTARY_MotorTimer2_ISR(void);
    extern void LINEAR_MotorPWMTimer_ISR(void);
    extern void LINEAR_MotorTimer2_ISR(void);
    extern void CONT_TIMER_ISR(void);
    extern void WatchdogIntHandler_ISR(void);
    extern void THERMISTOR_ADC_Sampler_ISR(void);
    extern void SENSOR_ADC_Sampler_ISR(void);
    extern void I2C_GPIO_Interupt_ISR(void);
    extern void I2C_ISR(void);
    extern void ARCNET_Interupt_ISR(void);
    extern void Switch_Interupt_ISR(void);
    extern void PRINTHEAD_ContLongTimer_ISR(void);
    extern void PRINTHEAD_ContShortTimer_ISR(void);
    extern void PRINTHEAD_PWRControlISR(void);
    extern void USB0DeviceIntHandler(void);
    extern void UART0_ISR (void);
    
    //*****************************************************************************
    //
    // The entry point for the application.
    // __main() is the entry point for Redlib based applications
    // main() is the entry point for Newlib based applications
    //
    //*****************************************************************************
    #if defined (__REDLIB__)
    extern void __main(void);
    #endif
    extern int main(void);
    //*****************************************************************************
    //
    // External declaration for the pointer to the stack top from the Linker Script
    //
    //*****************************************************************************
    extern void _vStackTop(void);
    
    //*****************************************************************************
    #if defined (__cplusplus)
    } // extern "C"
    #endif
    //*****************************************************************************
    //
    // The vector table.  Note that the proper constructs must be placed on this to
    // ensure that it ends up at physical address 0x0000.0000.
    //
    //*****************************************************************************
    extern void (* const g_pfnVectors[])(void);
    __attribute__ ((section(".isr_vector")))
    void (* const g_pfnVectors[])(void) = {
    	//
    		&_vStackTop, 							// The initial stack pointer
    		ResetISR,								// The reset handler
    		NMI_Handler,							// The NMI handler
    		HardFault_Handler,						// The hard fault handler
    		MemManage_Handler,						// The MPU fault handler
    		BusFault_Handler,						// The bus fault handler
    		UsageFault_Handler,						// The usage fault handler
    		0,										// Reserved
    		0,										// Reserved
    		0,										// Reserved
    		0,										// Reserved
    		SVC_Handler,							// SVCall handler
    		DebugMon_Handler,						// Debug monitor handler
    		0,										// Reserved
    		PendSV_Handler,							// The PendSV handler
    		SysTickHandler,						// The SysTick handler
    
    		// Chip Level
    		IntDefaultHandler, // GPIO Port A
    		IntDefaultHandler, // GPIO Port B
    		IntDefaultHandler, // GPIO Port C
    		IntDefaultHandler, // GPIO Port D
    		IntDefaultHandler, // GPIO Port E
    		UART0_ISR, // UART0 Rx and Tx
    		IntDefaultHandler, // UART1 Rx and Tx
    		IntDefaultHandler, // SSI Rx and Tx
    		I2C_ISR, 			// I2C Master and Slave
    		IntDefaultHandler, // PWM Fault
    		LINEAR_MotorPWMTimer_ISR, // PWM Generator 0
    		IntDefaultHandler, // PWM Generator 1
    		IntDefaultHandler, // PWM Generator 2
    		IntDefaultHandler, // Quadrature Encoder
    		SENSOR_ADC_Sampler_ISR, // ADC Sequence 0
    		IntDefaultHandler, // ADC Sequence 1
    		THERMISTOR_ADC_Sampler_ISR, // ADC Sequence 2
    		IntDefaultHandler, // ADC Sequence 3
    		WatchdogIntHandler_ISR, // Watchdog timer
    		ROTARY_MotorTimer2_ISR, // Timer 0 subtimer A
    		LINEAR_MotorTimer2_ISR, // Timer 0 subtimer B
    		SENSOR_TimerISR, // Timer 1 subtimer A
    		IntDefaultHandler, // Timer 1 subtimer B
    		PRINTHEAD_ContLongTimer_ISR, // Timer 2 subtimer A
    		PRINTHEAD_ContShortTimer_ISR, // Timer 2 subtimer B
    		IntDefaultHandler, // Analog Comparator 0
    		IntDefaultHandler, // Analog Comparator 1
    		IntDefaultHandler, // Analog Comparator 2
    		IntDefaultHandler, // System Control (PLL, OSC, BO)
    		IntDefaultHandler, // FLASH Control
    		IntDefaultHandler, // GPIO Port F
    		IntDefaultHandler, // GPIO Port G
    		IntDefaultHandler, // GPIO Port H
    		IntDefaultHandler, // UART2 Rx and Tx
    		IntDefaultHandler, // SSI1 Rx and Tx
    		PRINTHEAD_PWRControlISR, // Timer 3 subtimer A
    		IntDefaultHandler, // Timer 3 subtimer B
    		IntDefaultHandler, // I2C1 Master and Slave
    		IntDefaultHandler, // Quadrature Encoder 1
    		IntDefaultHandler, // CAN0
    		IntDefaultHandler, // CAN1
    		0, // Reserved
    		IntDefaultHandler, // Ethernet
    		IntDefaultHandler, // Hibernate
    		USB0DeviceIntHandler,                      // USB0
    		ROTARY_MotorPWMTimer_ISR,              // PWM Generator 3
    		IntDefaultHandler,                      // uDMA Software Transfer
    		IntDefaultHandler,                      // uDMA Error
    		IntDefaultHandler,                      // ADC1 Sequence 0
    		IntDefaultHandler,                      // ADC1 Sequence 1
    		IntDefaultHandler,                      // ADC1 Sequence 2
    		IntDefaultHandler,                      // ADC1 Sequence 3
    		IntDefaultHandler,                      // I2S0
    		IntDefaultHandler,                      // External Bus Interface 0
    		IntDefaultHandler                      // GPIO Port J
    
    	};
    
    //*****************************************************************************
    // Functions to carry out the initialization of RW and BSS data sections. These
    // are written as separate functions rather than being inlined within the
    // ResetISR() function in order to cope with MCUs with multiple banks of
    // memory.
    //*****************************************************************************
    __attribute__ ((section(".after_vectors")))
    void data_init(unsigned int romstart, unsigned int start, unsigned int len) {
    	unsigned int *pulDest = (unsigned int*) start;
    	unsigned int *pulSrc = (unsigned int*) romstart;
    	unsigned int loop;
    	for (loop = 0; loop < len; loop = loop + 4)
    		*pulDest++ = *pulSrc++;
    }
    
    __attribute__ ((section(".after_vectors")))
    void bss_init(unsigned int start, unsigned int len) {
    	unsigned int *pulDest = (unsigned int*) start;
    	unsigned int loop;
    	for (loop = 0; loop < len; loop = loop + 4)
    		*pulDest++ = 0;
    }
    
    #ifndef USE_OLD_STYLE_DATA_BSS_INIT
    //*****************************************************************************
    // The following symbols are constructs generated by the linker, indicating
    // the location of various points in the "Global Section Table". This table is
    // created by the linker via the Code Red managed linker script mechanism. It
    // contains the load address, execution address and length of each RW data
    // section and the execution and length of each BSS (zero initialized) section.
    //*****************************************************************************
    extern unsigned int __data_section_table;
    extern unsigned int __data_section_table_end;
    extern unsigned int __bss_section_table;
    extern unsigned int __bss_section_table_end;
    #else
    //*****************************************************************************
    // The following symbols are constructs generated by the linker, indicating
    // the load address, execution address and length of the RW data section and
    // the execution and length of the BSS (zero initialized) section.
    // Note that these symbols are not normally used by the managed linker script
    // mechanism in Red Suite/LPCXpresso 3.6 (Windows) and LPCXpresso 3.8 (Linux).
    // They are provide here simply so this startup code can be used with earlier
    // versions of Red Suite which do not support the more advanced managed linker
    // script mechanism introduced in the above version. To enable their use,
    // define "USE_OLD_STYLE_DATA_BSS_INIT".
    //*****************************************************************************
    extern unsigned int _etext;
    extern unsigned int _data;
    extern unsigned int _edata;
    extern unsigned int _bss;
    extern unsigned int _ebss;
    #endif
    
    
    //*****************************************************************************
    // Reset entry point for your code.
    // Sets up a simple runtime environment and initializes the C/C++
    // library.
    //
    //*****************************************************************************
    void ResetISR(void) {
    
    #ifndef USE_OLD_STYLE_DATA_BSS_INIT
        //
        // Copy the data sections from flash to SRAM.
        //
    	unsigned int LoadAddr, ExeAddr, SectionLen;
    	unsigned int *SectionTableAddr;
    
    	// Load base address of Global Section Table
    	SectionTableAddr = &__data_section_table;
    
        // Copy the data sections from flash to SRAM.
    	while (SectionTableAddr < &__data_section_table_end) {
    		LoadAddr = *SectionTableAddr++;
    		ExeAddr = *SectionTableAddr++;
    		SectionLen = *SectionTableAddr++;
    		data_init(LoadAddr, ExeAddr, SectionLen);
    	}
    	// At this point, SectionTableAddr = &__bss_section_table;
    	// Zero fill the bss segment
    	while (SectionTableAddr < &__bss_section_table_end) {
    		ExeAddr = *SectionTableAddr++;
    		SectionLen = *SectionTableAddr++;
    		bss_init(ExeAddr, SectionLen);
    	}
    #else
    	// Use Old Style Data and BSS section initialization.
    	// This will only initialize a single RAM bank.
    	unsigned int * LoadAddr, *ExeAddr, *EndAddr, SectionLen;
    
        // Copy the data segment from flash to SRAM.
    	LoadAddr = &_etext;
    	ExeAddr = &_data;
    	EndAddr = &_edata;
    	SectionLen = (void*)EndAddr - (void*)ExeAddr;
    	data_init((unsigned int)LoadAddr, (unsigned int)ExeAddr, SectionLen);
    	// Zero fill the bss segment
    	ExeAddr = &_bss;
    	EndAddr = &_ebss;
    	SectionLen = (void*)EndAddr - (void*)ExeAddr;
    	bss_init ((unsigned int)ExeAddr, SectionLen);
    #endif
    
    #ifdef __USE_CMSIS
    	SystemInit();
    #endif
    
    #if defined (__cplusplus)
    	//
    	// Call C++ library initialisation
    	//
    	__libc_init_array();
    #endif
    
    #if defined (__REDLIB__)
    	// Call the Redlib library, which in turn calls main()
    	__main();
    #else
    	main();
    #endif
    
    	//
    	// main() shouldn't return, but if it does, we'll just enter an infinite loop
    	//
    	while (1) {
    		;
    	}
    }
    
    //*****************************************************************************
    // Default exception handlers. Override the ones here by defining your own
    // handler routines in your application code.
    //*****************************************************************************
    void NMI_Handler(void)
    {
    
    
    		//Will enter an infinite loop.
    		//This will cause the watchdog to trip and cause a RESET within 2 seconds.
    
    	    //
    	    // Enter an infinite loop.
    	    //
    	    while(1)
    	    {
    	    	UARTprintf("\n NMI Handler Encountered - Looping Endlessly");
    	    }
    }
    
    void HardFault_Handler(void)
    {
    
        while(1)
        {
        	UARTprintf("\n Hard Fault Encountered - Looping Endlessly");
        }
    }
    
    void MemManage_Handler(void)
    {
    
        while(1)
        {
        	UARTprintf("\n Memory Management Handler Encountered - Looping Endlessly");
        }
    }
    
    void BusFault_Handler(void)
    {
    
        while(1)
        {
        	UARTprintf("\n Bus Fault Encountered - Looping Endlessly");
        }
    }
    
    void UsageFault_Handler(void)
    {
    
        while(1)
        {
        	UARTprintf("\n Usage Fault Encountered - Looping Endlessly");
        }
    }
    
    void SVC_Handler(void)
    {
    
        while(1)
        {
        	UARTprintf("\n SVC Handler Encountered - Looping Endlessly");
        }
    }
    
    void DebugMon_Handler(void)
    {
    
    	while(1)
        {
    		UARTprintf("\n DebugMon Handler Encountered - Looping Endlessly");
        }
    }
    
    void PendSV_Handler(void)
    {
    
        while(1)
        {
        	UARTprintf("\n PendSV Handler Encountered - Looping Endlessly");
        }
    }
    
    /*void SysTick_Handler(void)
    {
        while(1)
        {
        }
    }
    */
    //*****************************************************************************
    //
    // Processor ends up here if an unexpected interrupt occurs or a specific
    // handler is not present in the application code.
    //
    //*****************************************************************************
    void IntDefaultHandler(void)
    {
        while(1)
        {
        	UARTprintf("\n IntDefault Handler Encountered - Looping Endlessly");
        }
    }
    
    Charles,

    All these steps are being followed. I have attached main.c from the ported project, startup files

    for both the ported and Stellaris projects to this post.

    Thank you,

    Best Regards,

    Priya

    //**********************************************************************************************************************
    //
    // main.c 
    //
    // Copyright (c) Amano McGann 2010 
    //
    // This Module defines the main processing loop and entry point for the REPM Firmware.
    //
    //
    //***********************************************************************************************************************
    #include	"globals.h"
    //#include	"utils/cpu_usage.h"
    #include "Firmware_Updater.h"
    //#include "driverlib/watchdog.h"
    
    #pragma diag_suppress 169
    #pragma diag_suppress 112
    
    //ARCNET
    extern void Initialise_EPI_Interface(void);
    extern void	x_MailInit( void );
    extern void ARC_INIT(void);
    extern void ARC_MAIN (void);
    extern void	ARC_F1(void);
    
    
    
    //TEST COMMANDS
    extern void TestSendPrintTextMsg(void);
    extern void TestSendMotorMsg(void);
    extern void TestSendPrintLogoMsg(void);
    extern void TestSendPrint2dBarcodeMsg(void);
    extern void STATUS_DATA_Acquire(void);
    
    //WATCHDOG and LED
    extern void Watchdog_Initialise(void);
    extern void Watchdog_LED_Initialise(void);
    extern void Watchdog_LED_Close(void);
    extern BOOL Watchdog_LED_SetConfigState(unsigned char ucNewConfigState);
    extern void Watchdog_LED_TogglePulse(void);
    extern void Watchdog_GPIO_TogglePulse(void);
    //extern void WatchdogResetDisable(unsigned long ulBase);
    extern void IntMasterDisableAllButWD(void);
    
    //MOTOR CONTROL
    extern void LINEAR_MotorInitialise(void);
    extern void ROTARY_MotorInitialise(void);
    extern BOOL ROTARY_CheckForNextCommand(void);
    extern void LINEAR_CheckForNextCommand(void);
    extern void ROTARY_ProcessMotorControlCommand2(void);
    extern BOOL Solenoid_Initialise(void);
    
    //PRINTER CONTROL
    extern BOOL PRINTHEAD_Initialise_Interface(void);
    extern void PRINTHEAD_CountAndPrint(void);
    extern void THERMISTOR_TriggerSample(void);
    extern void PRINTHEAD_ControlPrinterContSignals(void);
    
    //I2C GPIO CONTROL
    extern void I2C_InitialiseInterface(void);
    extern uint8_t I2C_ReadGPIOData_Blocking(uint8_t ucPort);
    extern void I2C_Chip1InitiateRead(void);
    extern void I2C_GPIO_EnableInterupt(void);
    extern void I2C_ProcessReadGPIOData(void);
    extern uint8_t I2C_ProcessReadDipSwitchData(void);
    extern void I2C_ReadAndProcessStoredData(void);
    extern void I2C_SetScanTrigger(BOOL bTrigger);
    extern void I2C_SetScanAim(BOOL bAim);
    extern void I2C_SetScanPower(BOOL bEnable);
    
    //SYS-TICK TIMER CONTROL
    extern void TickTimer_Init(void);
    extern void TickTimer_CfgFnct(uint8_t n, void (*fnct)(void *), void *arg);
    extern uint16_t TickTimer_Chk(uint8_t n);
    extern void TickTimer_Reset(uint8_t n);
    extern void TickTimer_SetT(uint8_t n, uint16_t usMilliseconds);
    extern void TickTimer_SignalTmr(void);
    extern void TickTimer_Start(uint16_t n);
    extern void TickTimer_Stop(uint8_t n);
    extern void SysTickHandler(void);
    
    //REPM Control functions
    extern void REPM_CTRL_ExecuteQueuedCommand_AfterDelay(void);
    extern void REPM_ExecuteReturnTicketToUser(void);
    
    //OPTIC SENSORS
    extern BOOL SENSOR_ADC_Initialise(void);
    extern uint8_t SENSOR_CheckTicketPosition(uint8_t ucTickNum);
    
    //INTERRUPTS
    extern void INTCTRL_InterruptPrioritySet(void);
    
    //Switch
    extern BOOL Switch_Initialise(void);
    extern BOOL Switch_Read(void);
    
    //Level Shifter Control
    extern BOOL LevelShifter_Initialise(void);
    
    //Bezel LED Control
    extern void BEZEL_LED_Initialise(void);
    extern void BEZEL_ShutterSignalsLow(void);
    extern void BEZEL_LED_Toggle(void);
    
    //Feed Detect
    extern void FeedDetect_Initialise(void);
    extern void FB_SNSP_Off(void);
    
    //Status data Ticket Position
    extern void STATUS_DATA_SetCurrentTicketPosition(uint8_t ucCurrentTicketPosition, uint8_t ucTicketNumber);
    extern uint8_t STATUS_DATA_GetCurrentTicketNumber(void);
    extern void STATUS_DATA_CheckVaultBinSwitchTripped(void);
    extern void STATUS_DATA_CheckDeviceDoorSwitchTripped(void);
    extern BOOL STATUS_DATA_CheckREPMTrackSwitch(void);
    extern void STATUS_DATA_CheckVaultAndDoor (void);
    
    //CPU USAGE
    unsigned long g_ulCPUUsage=0;
    unsigned long g_ulCPUUsageMax=0;
    static BOOL bServiceCPU =FALSE;
    static uint8_t m_ucLinearWaitPeriods = 0;
    
    //DEBUG MESSAGES PRINTED DURING THE IDLE PROCESS
    BOOL g_bSystemIdleDebugMsg = FALSE;
    extern unsigned char ucCurrentLEDState;
    static void PrintSystemIdleDebugMsg(void); // This Function prints out the following REPM Firmware Information
    extern uint32_t STATUS_DATA_GetREPMPrintHeadSwitchStatus(void);
    extern BOOL SENSOR_Get_Ticket_Presence_Data(BOOL *bSensorPresence, uint8_t usSensorNum);
    extern BOOL SolenoidIsActive(void);
    extern uint8_t PRINTHEAD_CheckPrintheadTemperature(void);
    extern BOOL bEnableSwitchStatusMonitoring;
    extern BOOL g_bTicketDetectionSamplesCollected;
    									
    extern void I2C_DiscardFirstReadGPIOData_Blocking(uint8_t ucPort);
    extern void I2C_InitialiseOnlyI2CChip(void);
    //WHY DID THE LAST RESET HAPPEN
    unsigned long g_ulLastResetCause=0;
    
    //Global definitions
    BOOL g_bChip1ReadI2C = FALSE;
    BOOL g_bChip2ReadI2C = FALSE;
    BOOL g_bWatchdogLEDPulse = TRUE;
    BOOL g_bReadI2C = FALSE;
    BOOL g_bRotaryNow = FALSE;
    BOOL g_bArcNow = FALSE;
    BOOL g_bSecond_Ticket_Flag = FALSE;
    BOOL g_bSystemDebugMessageEnable = FALSE;
    BOOL g_bArnetEnabled = FALSE;
    BOOL g_bUSBEnabled = FALSE;
    BOOL g_bBulkValMode = FALSE;
    BOOL g_bRS485Enabled = FALSE;
    BOOL g_bValid_Ticket_Detected = FALSE;
    BOOL g_bWatchdogPulseNeeded = TRUE;
    
    uint32_t g_ui32SysClock;
    //Private functions
    static void SysTickTimer_CheckArcnet(void);
    static void SysTickTimer_CheckThermistor(void);
    static void SysTickTimer_CheckMotorCommands(void);
    static void Initialize_ARCNETInterface (void);
    static void Initialize_USBInterface (void);
    static void I2CStartupReadAllGPIOPorts (void);
    static void I2CSecondReadAllGPIOPorts (void);
    static void SysTickTimer_Scheduler(int);
    
    //TEST Code Only
    extern void LevelShifterEnable(void);
    extern void LevelShifterDisable(void);
    extern void Test_InterruptPriorityPrint(void);
    extern void SENSOR_TEST(void);
    extern void SENSOR_TEST_ONCE(void);
    extern void MemTest(void);
    extern void MemTest2(void);
    
    // USB Functionality
    extern void USBmain(void);
    extern void SysTickHandler(void);
    //*****************************************************************************
    //
    // The error routine that is called if the driver library encounters an error.
    //
    //*****************************************************************************
    #ifdef DEBUG
    void
    __error__(char *pcFilename, unsigned int ulLine)
    {
    }
    #endif
    
    //////////////////////////////////////////////////////////////////////
    // Function: SysTickTimer_CheckArcnet
    //
    // Function used to check for arcnet messages on a periodic basis
    //
    // Returns: None
    //
    //////////////////////////////////////////////////////////////////////
    void SysTickTimer_CheckArcnet(void)
    {
    	g_bArcNow = TRUE;
    }
    
    //////////////////////////////////////////////////////////////////////
    // Function: SysTickTimer_CheckThermistor
    //
    // Function used to check the Thermistor on a periodic basis
    //
    // Returns: None
    //
    //////////////////////////////////////////////////////////////////////
    void SysTickTimer_CheckThermistor(void) //SCHEDULED EVERY 1sec
    {
    	//check ticket position (Currently not used)
    	//STATUS_DATA_SetCurrentTicketPosition(SENSOR_CheckTicketPosition(STATUS_DATA_GetCurrentTicketNumber()),STATUS_DATA_GetCurrentTicketNumber());
    
    	//check switch status
    	STATUS_DATA_CheckREPMTrackSwitch();
    	
    	#ifdef _MONITOR_VAULT_BIN_SWITCH	
    	 // STATUS_DATA_CheckVaultBinSwitchTripped();
    	  //STATUS_DATA_CheckDeviceDoorSwitchTripped();
    	if(bEnableSwitchStatusMonitoring)
    	{
    		STATUS_DATA_CheckVaultAndDoor();
    	}
    	
    	#endif
    	
    	//check the printhead temperature
    	THERMISTOR_TriggerSample();
    	
    	//Trigger a read of the I2C port
    	g_bChip1ReadI2C = TRUE;
    	
    	#ifdef _REPM_CPU_USAGE_CALC
    	if((uiSeconds%3)==2)
    	{
    		UARTprintf("\n(CPU=%u.%u%%)",(((g_ulCPUUsageMax&0xffff0000)>>16)*100)/0x10000, ((g_ulCPUUsageMax&0x0000ffff)*1000)/0x10000);
    		g_ulCPUUsageMax=0;
    	}
    	#endif //_REPM_CPU_USAGE_CALC
    }
    
    //////////////////////////////////////////////////////////////////////
    // Function: SysTickTimer_CheckMotorCommands
    //
    // Function used to check for motor commands on a periodic basis.
    //
    // Returns: None
    //
    //////////////////////////////////////////////////////////////////////
    void SysTickTimer_CheckMotorCommands(void)
    {	
    	//SCHEDULE EVERY 250ms - Check to see if we have a motor command to execute
    	g_bRotaryNow = FALSE;
    	
    	//Check for a rotary command
    	if(ROTARY_CheckForNextCommand())
    	{
    		//Delay for 750ms - this ensures that the rotary movement is near 
    		//completion before a linear command is executed. 
    		//Ensures printhead is not raised during printing.
    		//m_ucLinearWaitPeriods = 3;
    		m_ucLinearWaitPeriods = 7;
    	}
    	
    	//If no queued Rotary command - check for linear commands...
    	//Otherwise wait for (multiple of 250ms) before checking for linear commands.
    	if(m_ucLinearWaitPeriods==0)
    	{		
    		LINEAR_CheckForNextCommand();
    	}
    	else
    	{
          if (m_ucLinearWaitPeriods>0)
    		m_ucLinearWaitPeriods--;
    	}
    }
    
    //////////////////////////////////////////////////////////////////////
    // Function: SysTickTimer_ToggleSNSP
    //
    // Function used to toggle the FB7000 SNSP signal after a delay
    //
    // Returns: None
    //
    //////////////////////////////////////////////////////////////////////
    void SysTickTimer_ToggleSNSP(void)
    {
    	FB_SNSP_Off();
    }
    
    //////////////////////////////////////////////////////////////////////
    // Function: InitSysTickTimer
    //
    // Function used to Initialise all of the sys tick timer we will use.
    //
    // Returns: None
    //
    //////////////////////////////////////////////////////////////////////
    void SysTickTimer_Scheduler(int iFunctionId)
    {
    	switch(iFunctionId)
    	{
    		case TICKTIMER_SCHEDULE_ARCNET_CHECK:
    			TickTimer_Reset(TICKTIMER_SCHEDULE_ARCNET_CHECK);
    			TickTimer_Start(TICKTIMER_SCHEDULE_ARCNET_CHECK);			
    			SysTickTimer_CheckArcnet();
    			break;	
    		case TICKTIMER_SCHEDULE_THEMISTOR_CHECK:
                
    			TickTimer_Reset(TICKTIMER_SCHEDULE_THEMISTOR_CHECK);
                TickTimer_Start(TICKTIMER_SCHEDULE_THEMISTOR_CHECK);			
    			SysTickTimer_CheckThermistor();
                
    			break;
    		case TICKTIMER_SCHEDULE_MOTOR_COMMAND_CHECK:
                
    			TickTimer_Reset(TICKTIMER_SCHEDULE_MOTOR_COMMAND_CHECK);
    			TickTimer_Start(TICKTIMER_SCHEDULE_MOTOR_COMMAND_CHECK);			
    			SysTickTimer_CheckMotorCommands();
    			break;
    		default:
    			break;
    	}
    }
    
    //////////////////////////////////////////////////////////////////////
    //
    // This is interrupt handler for the systick interrupt.
    //
    // This function handles the interrupts generated by the system tick.
    // It is used to set status flags that allow scheduling of periodic
    // tasks performed in the main function.
    //
    // Returns: None.
    //
    //////////////////////////////////////////////////////////////////////
    void SysTickHandler(void)
    {
    	//Immediately process motor commands if received
    	if(g_bRotaryNow)
    	{
    		SysTickTimer_CheckMotorCommands();
    	}
    	
    	//SysTickTimer Signal - This invokes timed events.
    	TickTimer_SignalTmr();
    	
    	//Trigger a CPU Usage check (when defined using _REPM_CPU_USAGE_CALC).
    	bServiceCPU = TRUE;
    }
    
    //////////////////////////////////////////////////////////////////////
    // Function: InitSysTickTimer
    //
    // Function used to initialise the System Tick Timer for scheduling
    // purposes. This current generates a system tick every 100uS.
    //
    // Returns: None
    //
    //////////////////////////////////////////////////////////////////////
    void InitSysTickTimer(void)
    {
        // Set the system tick to fire 1000 times per second.
    //    ROM_SysTickPeriodSet(SysCtlClockGet()/SYSTICK_FREQUENCY);
        ROM_SysTickPeriodSet(g_ui32SysClock/SYSTICK_FREQUENCY);
        ROM_SysTickIntEnable();
        ROM_SysTickEnable();
    }
    
    #ifdef _NEW_REPM_BOARD_NMI_ENABLED
    #include "inc/hw_gpio.h"
    void Initialise_NMI(void)
    {
    	ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOB);
    	
    	//GPIOPinTypeGPIOInput(GPIO_PORTB_BASE,GPIO_PIN_7);
    	
    	// Set the alternate function of PB7 to be NMI
    	GPIOPinConfigure(GPIO_PB7_NMI);
    	ROM_GPIODirModeSet(GPIO_PORTB_BASE, GPIO_PIN_7, GPIO_DIR_MODE_HW); 
    
    	// Unlock access to the commit register
    	HWREG(GPIO_PORTB_BASE + GPIO_O_LOCK) = GPIO_LOCK_KEY_DD;
    
    	// Set the commit register for PB7 to allow changing the function
    	HWREG(GPIO_PORTB_BASE + GPIO_O_CR) = 0x80;
    
    	// Enable the alternate function for PB7 (NMI)
    	HWREG(GPIO_PORTB_BASE + GPIO_O_AFSEL) |= 0x80;
    
    	// Turn on the digital enable for PB7
    	HWREG(GPIO_PORTB_BASE + GPIO_O_DEN) |= 0x80;
    
    	// Relock the commit register
    	HWREG(GPIO_PORTB_BASE + GPIO_O_LOCK) = 0;
    }
    
    /*
    void NMI_GPIO_ISR(void)
    {
    	UARTprintf("\n NMI GPIO Triggered");
    }
    
    void Initialise_NMI_GPIO(void)
    {
    	ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOB);
    	SysCtlPeripheralSleepEnable(SYSCTL_PERIPH_GPIOB);
    
    	//Set Pins as input
    	ROM_GPIOPinTypeGPIOInput(GPIO_PORTB_BASE, GPIO_PIN_7);
    	
    	GPIOPortIntRegister(GPIO_PORTB_BASE, NMI_GPIO_ISR);
    	ROM_GPIOIntTypeSet(GPIO_PORTB_BASE, GPIO_PIN_7, GPIO_FALLING_EDGE);
    	 
    	//Disable until message sent to enable
    	ROM_GPIOPinIntEnable(GPIO_PORTB_BASE, GPIO_PIN_7);
    }*/
    
    #endif //_NEW_REPM_BOARD_NMI_ENABLED
    
    ////////////////////////////////////////////////////////////////////////
    //Function: PrintSystemIdleDebugMsg
    //
    // Function Use to Print the Following Debug Information During the 
    // REPM Idle stage. On receipt of an Arcnet Message, the Debug Message
    // Printing is Stopped. The printing is enabled back upon completion of the
    // 1. LED Blinking Status--> ON/OFF
    // 2. Printhead Position--> UP/DOWN
    // 3. Sensor(s) Tripped--> ISSUE/EJECT, SCAN, PRINT, ESCROW, NONE
    // 4. Solenoid Satus--> ENGAGED/DISENGAGED
    //	
    //
    // Returns: None
    /////////////////////////////////////////////////////////////////////////
    void PrintSystemIdleDebugMsg (void)
    {
    	UARTprintf("\n*********************************************\n");
    	UARTprintf("\n The LED Toggle State is %u \n", ucCurrentLEDState);
    	if((STATUS_DATA_GetREPMPrintHeadSwitchStatus()==PRINTHEAD_DOWN))
    	{
    		UARTprintf("\n The Printhead Position is      DOWN\n");
    	}
    	else if((STATUS_DATA_GetREPMPrintHeadSwitchStatus()==PRINTHEAD_UP))
    	{
    		UARTprintf("\n The Printhead Position is      UP\n");
    	}
    	else
    	{
    		UARTprintf("\n There is a Printhead Position      ERROR\n");
    	}
    	
    	uint8_t Eject, Issue, Scan, Print, Escrow=0;
    	
    	SENSOR_Get_Ticket_Presence_Data(&Eject, 0);
    	SENSOR_Get_Ticket_Presence_Data(&Issue, 1);
    	SENSOR_Get_Ticket_Presence_Data(&Scan, 2);
    	SENSOR_Get_Ticket_Presence_Data(&Print, 3);
    	SENSOR_Get_Ticket_Presence_Data(&Escrow, 4);
    	UARTprintf("\n Sensor Tripped Data:\n EJECT = %u \n ISSUE = %u \n SCAN = %u \n PRINT = %u \n ESCROW = %u \n", Eject, Issue, Scan, Print, Escrow);
    	
    	BOOL Solenoid_Status =SolenoidIsActive();
    	if (Solenoid_Status)
    	{
    		UARTprintf("\n\n\n The Solenoid is ENGAGED\n");
    	}
    	else
    	{
    			UARTprintf("\n\n\n The Solenoid is DISENGAGED\n");
    	}
    	
    	uint8_t ucTempStatus = 0;
    	ucTempStatus = PRINTHEAD_CheckPrintheadTemperature();
    	UARTprintf("\n The Current Printhead Temp Status is %u \n", ucTempStatus);
    	UARTprintf("\n*********************************************\n");
    		
    }
    
    
    //////////////////////////////////////////////////////////////////////
    // Function: void Initialize_ARCNETInterface (void)
    //
    // This Function Initializes the Arcnet Interface 
    //
    //
    // Returns: None.
    //
    //////////////////////////////////////////////////////////////////////
    void Initialize_ARCNETInterface (void)
    
    {
    	x_MailInit(); 
    	 //Initialise the Arcnet task
    	ARC_INIT();
    	ARC_F1();
    	////Arcnet Related Tick Timer Initiliasation-------------------------------->// 
    	TickTimer_CfgFnct(TICKTIMER_SCHEDULE_ARCNET_CHECK, (void*)&SysTickTimer_Scheduler, (void*)TICKTIMER_SCHEDULE_ARCNET_CHECK);
    	TickTimer_SetT(TICKTIMER_SCHEDULE_ARCNET_CHECK, TICKTIMER_ARCNET_CHECK_PERIOD_MS);
    	TickTimer_Start(TICKTIMER_SCHEDULE_ARCNET_CHECK);
    	////Arcnet Related-------------------------------->//
    	
    }
    
    
    
    
    
    
    
    //////////////////////////////////////////////////////////////////////
    // Function: void Initialize_USBInterface (void);
    
    // This Function Initializes the USB Interface 
    
    // Returns: None.
    //
    //////////////////////////////////////////////////////////////////////
    void Initialize_USBInterface (void)
    {
    	USBmain();
    	
    }
    
    
    
    //////////////////////////////////////////////////////////////////////
    // Function: main()
    //
    // This is the main function. It controls the initialisation of the
    // interfaces and had the main loop of execution.
    // Other execution is performed at interrupt level.
    //
    // Returns: Never.
    //
    //////////////////////////////////////////////////////////////////////
    int main(void)
    {	
        uint32_t ui32PLLRate;
        // Set the PWM Divisor
    //    SysCtlPWMClockSet(SYSCTL_PWMDIV_4);
    
        // Set the clocking to run directly from the crystal.
      //  ROM_SysCtlClockSet(SYSCTL_SYSDIV_2_5 | SYSCTL_USE_PLL | SYSCTL_OSC_MAIN | SYSCTL_XTAL_16MHZ); // This uses the external clock at 80 MHz
          //Disable All Interupts
    //
       // g_ui32SysClock = SysCtlClockFreqSet((SYSCTL_XTAL_25MHZ |SYSCTL_OSC_MAIN |SYSCTL_USE_PLL |SYSCTL_CFG_VCO_480), 80000000);
    #ifdef _120_MHz
    
                g_ui32SysClock =  SysCtlClockFreqSet((SYSCTL_XTAL_25MHZ |
                                                     SYSCTL_OSC_MAIN |
                                                     SYSCTL_USE_PLL |
                                                     SYSCTL_CFG_VCO_480), 120000000);
    
     //g_ui32SysClock =  SysCtlClockFreqSet(SYSCTL_OSC_INT | SYSCTL_USE_PLL | SYSCTL_CFG_VCO_320, 40000000);
     //g_ui32SysClock =  SysCtlClockFreqSet(SYSCTL_OSC_INT | SYSCTL_USE_OSC, 16000000);
    
    
    #else
        g_ui32SysClock =  SysCtlClockFreqSet((SYSCTL_XTAL_25MHZ |
                                                     SYSCTL_OSC_MAIN |
                                                     SYSCTL_USE_PLL |
                                                   SYSCTL_CFG_VCO_480), 80000000);
    #endif
    
    
        //Disable All Interupts
        IntMasterDisableAllButWD();
     //   ROM_IntMasterDisable();	        
            Solenoid_Initialise();    
            Watchdog_Initialise(); // Temp Disable 09-06-2017
            Watchdog_LED_Initialise(); // Temp Disable 09-06-2017
            Watchdog_LED_SetConfigState(LED_CONFIG_STATE_FLASHING); // Temp Disable 09-06-2017
        
        //Disable All Interupts
      //  ROM_IntMasterDisable();
        
     
            // Initialize the UART.
    
            /**********************************************************/
                    ROM_SysCtlPeripheralEnable(UART0_GPIO_PERIPHERAL_TX);
                    ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_UART0); // Enable the Peripherals
    
    
                    GPIOPinConfigure(GPIO_PA0_U0RX);
                    GPIOPinConfigure(GPIO_PA1_U0TX);
                    GPIOPinTypeUART(GPIO_PORTA_BASE, GPIO_PIN_0 | GPIO_PIN_1);
                   // ROM_IntEnable(INT_UART0);
                  //  ROM_UARTIntEnable(UART0_BASE, UART_INT_RX | UART_INT_RT);
    				UARTStdioConfig(0,115200,g_ui32SysClock);
    
    
        UARTprintf("\033[2J \nREPM FIRMWARE RUNNING! [PLL CLK @ %uMHz]",g_ui32SysClock/1000000);
        UARTprintf("\n-----------------------------------------");
    	#ifdef NDEBUG
          UARTprintf("\n[Release Version %d.%d Amano McGann Inc(c)]\n",REPM_FIRMWARE_VERSION_MAJOR, REPM_FIRMWARE_VERSION_MINOR);
    	#else
          UARTprintf("\n[Debug Version %d.%d, Amano McGann Inc (c)]\n",REPM_FIRMWARE_VERSION_MAJOR, REPM_FIRMWARE_VERSION_MINOR);
    	#endif
          
          SysCtlVCOGet(SYSCTL_XTAL_25MHZ, &ui32PLLRate);
          UARTprintf("\n ui32PLLRate = %d\n", ui32PLLRate);
    
        //Initialise the I2C Interface for reading/writing GPIOs
        I2C_InitialiseInterface();
    
        SysCtlDelay(g_ui32SysClock/10); // Reduced this delay to 100 mS
            //Read all the ports on startup
            // This clears the I2C chip Interrupt
            I2CStartupReadAllGPIOPorts(); // Read All the ports on Startup But don't save it
            I2CSecondReadAllGPIOPorts();
    
    
    
            //Process the I2C data read on startup.
            I2C_ProcessReadGPIOData();
            //Read and Process Stored I2C Data
            I2C_ReadAndProcessStoredData();
            I2C_SetScanAim(FALSE);
            I2C_SetScanTrigger(FALSE);
            I2C_SetScanPower(TRUE);
    
            //Set Interrupt Priority Levels
            SysCtlDelay(g_ui32SysClock/200);
            INTCTRL_InterruptPrioritySet();
            SysCtlDelay(g_ui32SysClock/200);
          
        //INIT MAIL
        //x_MailInit(); //Arcnet Related-------------------------------->
        
        //Initialise the Arcnet task
        //ARC_INIT(); //Arcnet Related-------------------------------->
        //ARC_F1(); //Arcnet Related-------------------------------->
    
        //Initialise the Printhead
        PRINTHEAD_Initialise_Interface();
        
    
        //Initialise the Sensors
        SENSOR_ADC_Initialise();
        
        //Initialise the motor controls
        LINEAR_MotorInitialise();
        ROTARY_MotorInitialise();
      
        //Initialise the Bezel LED
        BEZEL_LED_Initialise();
        
        //Initialise the Level Shifter Interface
        //LevelShifter_Initialise(); //<- NOT NEEDED RIGHT NOW - Check pin definitons before using.
        
        //Initialise Feed Detect
        FeedDetect_Initialise();
        
        //Initialise Switch GPIO Interface. This is currently not used
      //  Switch_Initialise();
       
    	#ifdef _REPM_CPU_USAGE_CALC
         //Initialise CPU Usage counters - Uses a Timer - only use when necessary
         CPUUsageInit(ROM_SysCtlClockGet(), SYSTICK_FREQUENCY, 3);
    	#endif
    	
        //Disable All Interupts
      //  ROM_IntMasterDisable(); // Already Disabled at the beginning of the Main loop
        
    
    	
     
        
        //TODO: TEMPORARY DISABLED FOR TESTING. THIS SHOULD BE REMOVED.
    //    ROM_WatchdogResetDisable(WATCHDOG0_BASE);
    	
        UARTprintf("\n---------- Beginning Main Loop ----------");
        	
    //    	g_ulLastResetCause=SysCtlResetCauseGet();
         //   UARTprintf("\n\n\n The value in the Reset Cause Register is (%u)\n", g_ulLastResetCause);
    //        SysCtlResetCauseClear(g_ulLastResetCause);
    	
        #ifdef _NEW_REPM_BOARD_NMI_ENABLED
         //Enable the NMI Interrupt
         Initialise_NMI();
    	 //Initialise_NMI_GPIO();
        #endif //_NEW_REPM_BOARD_NMI_ENABLED	
         
        //Enable All Interupts
    //     g_bSystemIdleDebugMsg = TRUE; // Initialize the System Idle Printing Message
         //ROM_IntMasterEnable();
         
         I2C_ProcessReadDipSwitchData(); // Process the DIP Switch Setting
         if(g_bArnetEnabled) // Arcnet is Enabled with DIP Switch Value of 0
         {
        	 Initialize_ARCNETInterface(); //Arcnet Interface is Enabled
         }
         else
         {
        	 Initialize_USBInterface(); 
         }
         //Initialise and Start the Watchdog Timer and LED
         //Watchdog_Initialise();
        // Watchdog_LED_Initialise();
        // Watchdog_LED_SetConfigState(LED_CONFIG_STATE_FLASHING);   
    
         ROM_UARTIntClear(UART0_BASE, UARTIntStatus(UART0_BASE, false));
         ROM_IntEnable(INT_UART0);
         ROM_UARTIntEnable(UART0_BASE, UART_INT_RX | UART_INT_RT);
         g_bWatchdogPulseNeeded = FALSE;
         WatchdogReloadSet(WATCHDOG0_BASE, (g_ui32SysClock/2));
    
         ROM_IntMasterEnable();
         
    
         //Setup SysTickTimer Periodic functions
          TickTimer_Init();
    
          TickTimer_CfgFnct(TICKTIMER_SCHEDULE_MOTOR_COMMAND_CHECK, (void*)&SysTickTimer_Scheduler, (void*)TICKTIMER_SCHEDULE_MOTOR_COMMAND_CHECK);
          TickTimer_SetT(TICKTIMER_SCHEDULE_MOTOR_COMMAND_CHECK, TICKTIMER_MOTOR_COMMAND_CHECK_PERIOD_MS);
          TickTimer_Start(TICKTIMER_SCHEDULE_MOTOR_COMMAND_CHECK);
    
          TickTimer_CfgFnct(TICKTIMER_SCHEDULE_THEMISTOR_CHECK, (void*)&SysTickTimer_Scheduler, (void*)TICKTIMER_SCHEDULE_THEMISTOR_CHECK);
          TickTimer_SetT(TICKTIMER_SCHEDULE_THEMISTOR_CHECK, TICKTIMER_THEMISTOR_CHECK_PERIOD_MS);
          TickTimer_Start(TICKTIMER_SCHEDULE_THEMISTOR_CHECK);
          ////Arcnet Related-------------------------------->//
          TickTimer_CfgFnct(TICKTIMER_SCHEDULE_ARCNET_CHECK, (void*)&SysTickTimer_Scheduler, (void*)TICKTIMER_SCHEDULE_ARCNET_CHECK);
          TickTimer_SetT(TICKTIMER_SCHEDULE_ARCNET_CHECK, TICKTIMER_ARCNET_CHECK_PERIOD_MS);
          TickTimer_Start(TICKTIMER_SCHEDULE_ARCNET_CHECK);
          ////Arcnet Related-------------------------------->//
          TickTimer_CfgFnct(TICKTIMER_SOLENOID_ENGAGE_DELAY, (void*)&ROTARY_ProcessMotorControlCommand2, (void*)TICKTIMER_SOLENOID_ENGAGE_DELAY);
          TickTimer_SetT(TICKTIMER_SOLENOID_ENGAGE_DELAY, TICKTIMER_SOLENOID_ENGAGE_PERIOD_MS);
    
          TickTimer_CfgFnct(TICKTIMER_DTF_CUT_DELAY, (void*)&REPM_CTRL_ExecuteQueuedCommand_AfterDelay, (void*)TICKTIMER_DTF_CUT_DELAY);
          TickTimer_SetT(TICKTIMER_DTF_CUT_DELAY, TICKTIMER_DTF_CUT_PERIOD_MS);
    
          TickTimer_CfgFnct(TICKTIMER_SNSP_SIGNAL_TOGGLE, (void*)&SysTickTimer_ToggleSNSP, (void*)TICKTIMER_SNSP_SIGNAL_TOGGLE);
          TickTimer_SetT(TICKTIMER_SNSP_SIGNAL_TOGGLE, TICKTIMER_SNSP_SIGNAL_TOGGLE_PERIOD_MS);
    
          TickTimer_CfgFnct(TICKTIMER_BEZEL_SHUTTER_TOGGLE, (void*)&BEZEL_ShutterSignalsLow, (void*)TICKTIMER_BEZEL_SHUTTER_TOGGLE);
          TickTimer_SetT(TICKTIMER_BEZEL_SHUTTER_TOGGLE, TICKTIMER_BEZEL_SHUTTER_PERIOD_MS);
    
          TickTimer_CfgFnct(TICKTIMER_BEZEL_LED_TOGGLE, (void*)&BEZEL_LED_Toggle, (void*)TICKTIMER_BEZEL_LED_TOGGLE);
          TickTimer_SetT(TICKTIMER_BEZEL_LED_TOGGLE, TICKTIMER_BEZEL_LED_PERIOD_MS);
    
          TickTimer_CfgFnct(TICKTIMER_INIT_SOLENOID_RELEASE, (void*)&REPM_CTRL_ExecuteQueuedCommand_AfterDelay, (void*)TICKTIMER_INIT_SOLENOID_RELEASE);
          TickTimer_SetT(TICKTIMER_INIT_SOLENOID_RELEASE, TICKTIMER_INIT_SOLENOID_RELEASE_MS);
    
          TickTimer_CfgFnct(TICKTIMER_RETURN_TICKET_TO_USER_DELAY, (void*)&REPM_ExecuteReturnTicketToUser, (void*)TICKTIMER_RETURN_TICKET_TO_USER_DELAY);
          TickTimer_SetT(TICKTIMER_RETURN_TICKET_TO_USER_DELAY, TICKTIMER_RETURN_TICKET_TO_USER_DELAY_MS);
          //Initialise the System Ticks for timing purposes
          InitSysTickTimer();
    
    
    
         // Initializes the USB Interface and puts the device on the bus
        // Finished Initialisation. Check for watchdog during main loop.
        while(FOREVER)
        {
        	//Check for ARCNET messages
        	if(g_bArcNow)
        	{
        		g_bArcNow = FALSE;
        		
        		//RUN ARC MAIN
                ARC_MAIN();
        	}
        	
        	//Read the GPIO input data from the I2c
        	if(g_bReadI2C)
        	{
        		I2C_Chip1InitiateRead();
        	}
        
    		//Check for Watchdog Pulse - Toggle LED and GPIO.
    		if(g_bWatchdogLEDPulse)
    		{
    			Watchdog_LED_TogglePulse();
    			//Watchdog_GPIO_TogglePulse();
    			g_bWatchdogLEDPulse = FALSE;
    		//	#ifdef _SYSTEM_IDLE_DEBUG_MESG
    //		if (g_bSystemDebugMessageEnable)
    //			{
    //				if (g_bSystemIdleDebugMsg)
    //				{
    //				PrintSystemIdleDebugMsg();
    //				}
    //			}
    //		//	#endif
    			
    		}    
        	
    		#ifdef _REPM_CPU_USAGE_CALC
        	 if(bServiceCPU) //Execute only when CPU Usage calc is required
        	 {
     	    	g_ulCPUUsage = CPUUsageTick(); 
     	    	if(g_ulCPUUsage>g_ulCPUUsageMax) //Find the highest CPU usage since we last printed
     	    		g_ulCPUUsageMax =g_ulCPUUsage;
     	    	
        	    //Delay for a bit
        	    SysCtlDelay(10);
        	    //Put the processor to sleep
        	    SysCtlSleep();
        	    
        	    bServiceCPU =FALSE;
        	 }
    		#endif //_REPM_CPU_USAGE_CALC
        }
        
        return(0);
    }
    
    /************************************************************************************************/
    static void I2CStartupReadAllGPIOPorts (void)
    {
    
          I2C_DiscardFirstReadGPIOData_Blocking(0);
          I2C_DiscardFirstReadGPIOData_Blocking(1);
          I2C_DiscardFirstReadGPIOData_Blocking(2);
          I2C_DiscardFirstReadGPIOData_Blocking(3);
          I2C_DiscardFirstReadGPIOData_Blocking(4);
    }
    
    /*************************************************************************************************/
    
    static void I2CSecondReadAllGPIOPorts (void)
    {
        UARTprintf("\nAttempting to Read I2C Chip......\n");
        uint8_t ucPort0Data, ucPort1Data, ucPort2Data, ucPort3Data, ucPort4Data = 0;
        uint8_t DIPSwitchReadCorrectly = FALSE;
        do
        {
                  ucPort0Data = I2C_ReadGPIOData_Blocking(0);
                  ucPort1Data = I2C_ReadGPIOData_Blocking(1);
                  ucPort2Data = I2C_ReadGPIOData_Blocking(2);
                  ucPort3Data = I2C_ReadGPIOData_Blocking(3);
                  ucPort4Data = I2C_ReadGPIOData_Blocking(4);
    
               UARTprintf("\nDipSwitchValue Read Before I2C Chip Reset = 0x%X\n",ucPort4Data);
             //  if ((ucPort4Data & 0x0F)==0x00)
               if (((ucPort4Data & 0x0F)== (0x0D)) || ((ucPort4Data & 0x0F)== (0x0F)) || ((ucPort4Data & 0x09)== (0x09)))
               {
                   DIPSwitchReadCorrectly=TRUE;
                   UARTprintf("\nDipSwitchValue Read After I2C Chip Reset = 0x%X\n",ucPort4Data);
               }
    
               else
               {
    
                    DIPSwitchReadCorrectly=FALSE;
                   // I2C_InitialiseInterface();
                    I2C_InitialiseOnlyI2CChip();
                    SysCtlDelay(g_ui32SysClock/10); // Reduce this delay to 100 mS
                    ucPort0Data = I2C_ReadGPIOData_Blocking(0);
                    ucPort1Data = I2C_ReadGPIOData_Blocking(1);
                    ucPort2Data = I2C_ReadGPIOData_Blocking(2);
                    ucPort3Data = I2C_ReadGPIOData_Blocking(3);
                    ucPort4Data = I2C_ReadGPIOData_Blocking(4);
                    UARTprintf("\nDipSwitchValue Read After I2C Chip Reset = 0x%X\n",ucPort4Data);
               }
    
        }
       while (!DIPSwitchReadCorrectly) ;
          //while ((ucPort4Data & 0x0F)==0x00);
            UARTprintf("\nPass\n");
    }
    

  • systick.zipI don't really spot anything wrong your tm4c1290ncpdt_startup_ccs.c. I will suggest you try the TivaWare systick example and compare with yours.  Here is the systick project.