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.

CCS/TM4C123GH6PGE: Reset issue

Part Number: TM4C123GH6PGE

Tool/software: Code Composer Studio

Good afternoon every one,

              I developed my code for one of my embedded application by using TM4C123GH6PGE Microcontroller. My code is working fine but after executing the code, with in few seconds its getting reset interrupt by the compiler (code composer studio V6) and it stops the debugging and again its starts from first instruction.

When reset interrupt occurs the it automatically going to startup_ccs.c   and showing me like this statements below.

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");
}

 


I request you to please tell me why this problem is occurring in my code and please suggest me how to solve this problem with out disturb my flow of code sequence.

Thanks in advance.

  • Can "working fine" properly define code which generates "unwanted Resets?"

    You seek a solution - yet provide, "No insight into your code" - nor "treatment of the MCU's hardware implementation" at/around MCU's Reset pin.
    Might (both) prove useful?

  • Hello Srinu,

    Usually that occurs when you have enabled an interrupt but don't have the ISR routed correctly inside of the startup_ccs.c file. Please share details about what interrupts you have enabled and what ISR's you are using for your project.
  • Thanks for replying me sir
    I am using below interrupts along with their priorities.

    IntMasterEnable();

    IntPrioritySet(INT_TIMER0A, 0x00);

    IntPrioritySet(INT_PWM0_0_TM4C123, 0x20);

    IntPrioritySet(INT_PWM0_1_TM4C123, 0x40);

    IntPrioritySet(INT_PWM0_2_TM4C123, 0x60);

    IntPrioritySet(INT_ADC0SS0_TM4C123, 0x80);

    IntPrioritySet(INT_TIMER1A, 0xA0);

    IntPrioritySet( INT_HIBERNATE_TM4C123, 0xC0);

    IntPrioritySet(FAULT_SYSTICK, 0xE0);



    and my startup_ccs.c file is

    //*****************************************************************************
    #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
    		IntDefaultHandler, // The MPU fault handler
    		IntDefaultHandler, // The bus fault handler
    		IntDefaultHandler, // The usage fault handler
    		0, // Reserved
    		0, // Reserved
    		0, // Reserved
    		0, // Reserved
    		IntDefaultHandler, // SVCall handler
    		IntDefaultHandler, // Debug monitor handler
    		0, // Reserved
    		IntDefaultHandler, // The PendSV handler
    		SysTickIntHandler, // The SysTick handler
    		IntDefaultHandler, // GPIO Port A
    		IntDefaultHandler, // GPIO Port B
    		IntDefaultHandler, // GPIO Port C
    		IntDefaultHandler, // GPIO Port D
    		IntDefaultHandler, // GPIO Port E
    		UART0IntHandler, // UART0 Rx and Tx
    		IntDefaultHandler, // UART1 Rx and Tx
    		IntDefaultHandler, // SSI0 Rx and Tx
    		IntDefaultHandler, // I2C0 Master and Slave
    		IntDefaultHandler, // PWM Fault
    		PWM0IntHandler, // PWM Generator 0
    		MainWaveformTick, // PWM Generator 1
    		MainMillisecondTick, // PWM Generator 2
    		IntDefaultHandler, // Quadrature Encoder 0
    		ADC0IntHandler, // ADC Sequence 0
    		IntDefaultHandler, // ADC Sequence 1
    		IntDefaultHandler, // ADC Sequence 2
    		IntDefaultHandler, // ADC Sequence 3
    		IntDefaultHandler, // Watchdog timer
    		Timer0IntHandler, // Timer 0 subtimer A
    		IntDefaultHandler, // Timer 0 subtimer B
    		Timer1IntHandler, // Timer 1 subtimer A
    		IntDefaultHandler, // Timer 1 subtimer B
    		IntDefaultHandler, // Timer 2 subtimer A
    		IntDefaultHandler, // 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
    		UART2IntHandler, // UART2 Rx and Tx
    		IntDefaultHandler, // SSI1 Rx and Tx
    		IntDefaultHandler, // Timer 3 subtimer A
    		IntDefaultHandler, // Timer 3 subtimer B
    		IntDefaultHandler, // I2C1 Master and Slave
    		IntDefaultHandler, // Quadrature Encoder 1
    		IntDefaultHandler, // CAN0
    		IntDefaultHandler, // CAN1
    		0, // Reserved
    		0, // Reserved
    		IntDefaultHandler, // Hibernate
    		IntDefaultHandler, // USB0
    		IntDefaultHandler, // 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
    		0, // Reserved
    		0, // Reserved
    		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
    		0, // Reserved
    		0, // Reserved
    		0, // Reserved
    		0, // Reserved
    		IntDefaultHandler, // I2C2 Master and Slave
    		IntDefaultHandler, // I2C3 Master and Slave
    		IntDefaultHandler, // Timer 4 subtimer A
    		IntDefaultHandler, // Timer 4 subtimer B
    		0, // Reserved
    		0, // Reserved
    		0, // Reserved
    		0, // Reserved
    		0, // Reserved
    		0, // Reserved
    		0, // Reserved
    		0, // Reserved
    		0, // Reserved
    		0, // Reserved
    		0, // Reserved
    		0, // Reserved
    		0, // Reserved
    		0, // Reserved
    		0, // Reserved
    		0, // Reserved
    		0, // Reserved
    		0, // Reserved
    		0, // Reserved
    		0, // Reserved
    		IntDefaultHandler, // Timer 5 subtimer A
    		IntDefaultHandler, // Timer 5 subtimer B
    		IntDefaultHandler, // Wide Timer 0 subtimer A
    		IntDefaultHandler, // Wide Timer 0 subtimer B
    		IntDefaultHandler, // Wide Timer 1 subtimer A
    		IntDefaultHandler, // Wide Timer 1 subtimer B
    		IntDefaultHandler, // Wide Timer 2 subtimer A
    		IntDefaultHandler, // Wide Timer 2 subtimer B
    		IntDefaultHandler, // Wide Timer 3 subtimer A
    		IntDefaultHandler, // Wide Timer 3 subtimer B
    		IntDefaultHandler, // Wide Timer 4 subtimer A
    		IntDefaultHandler, // Wide Timer 4 subtimer B
    		IntDefaultHandler, // Wide Timer 5 subtimer A
    		IntDefaultHandler, // Wide 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
    		IntDefaultHandler, // Quadrature Encoder 2
    		0, // Reserved
    		0, // Reserved
    		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, // PWM 1 Generator 0
    		IntDefaultHandler, // PWM 1 Generator 1
    		IntDefaultHandler, // PWM 1 Generator 2
    		IntDefaultHandler, // PWM 1 Generator 3
    		IntDefaultHandler // PWM 1 Fault
    };
    
    //*****************************************************************************
    //
    // 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");
    }
    
    
    




    Please suggest me how to resolve the issue.

    Thanks,
    Regards,
    Srinu.

  • Hello Srinu,

    Do you also have extern function definitions for all your ISRs within startup_ccs.c? Such as:

    extern void PWM0IntHandler(void);
    extern void MainWaveformTick(void);
    extern void MainMillisecondTick(void);
    extern void SysTickIntHandler(void);
    extern void ADC0IntHandler(void);
    extern void Timer0IntHandler(void);
    extern void Timer1IntHandler(void);
    

    Additionally I didn't see any interrupt handle for:

    IntPrioritySet( INT_HIBERNATE_TM4C123, 0xC0);

    Lastly, it looks like you have two UART interrupts:

    UART0IntHandler
    UART2IntHandler

    Are those being used or not? Couldn't tell clearly. If not, they should be returned to IntDefaultHandler.

  • Greetings Ralph,

    You've made some progress here - yet "so much" of that "Start-Up file" has (likely) been "borrowed" from (long past) LMI code for Brushless Motors... (or it may have been "re-used" for newer implementations - of which I am unaware - yet a "trap" awaits...)

    In particular - these lines "telegraph such appropriation":

    PWM0IntHandler,          // PWM Generator 0
    MainWaveformTick,     // PWM Generator 1 // rather a strange name
    MainMillisecondTick,  // PWM Generator 2 // and another

    It should be noted that the code employed "Faked" (i.e. SW interrupts) for PWM Gens 1 & 2 - launching both from PWM Gen 0 which often "traps" the unaware...

  • Hi cb1,

    Oh really? Hadn't heard of that example code before. Sounds like something else for Srinu to investigate as well then. Was there any resolution to avoid such traps that you are aware of? (Forgive my lack of self-search on E2E today, time is quite short currently)
  • Hello sir,


    I am using MainWaveformTick and MainMillisecondTick is the function which is used by generating the interrupt by PWM interrupts.
    I am calling these two functions by using the two PWM interrupts for other purpose.
  • Hai sir,


    I Declare my intrrupts in startup_ccs.c like below


    void ResetISR(void);
    static void NmiSR(void);
    static void FaultISR(void);
    static void IntDefaultHandler(void);
    extern void PWM0IntHandler(void);
    extern void MainWaveformTick(void);
    extern void MainMillisecondTick(void);
    extern void SysTickIntHandler(void);
    extern void Timer0IntHandler(void);
    extern void Timer1IntHandler(void);
    extern void ADC0IntHandler(void);
    extern void Timer0IntHandler(void);
    extern void UART0IntHandler(void);
    extern void RTCHandler(void);
    extern void UART2IntHandler(void);
    extern void HibernateHandler(void);



    And also i am using both the interrupts UART0IntHandler and UART2IntHandler


    I mention Hibernate interrupt handler like this HibernateHandler, // Hibernate

    I am using below interrupts along with their priorities.

    IntMasterEnable();

    IntPrioritySet(INT_TIMER0A, 0x00);

    IntPrioritySet(INT_PWM0_0_TM4C123, 0x20);

    IntPrioritySet(INT_PWM0_1_TM4C123, 0x40);

    IntPrioritySet(INT_PWM0_2_TM4C123, 0x60);

    IntPrioritySet(INT_ADC0SS0_TM4C123, 0x80);

    IntPrioritySet(INT_TIMER1A, 0xA0);

    IntPrioritySet( INT_HIBERNATE_TM4C123, 0xC0);

    IntPrioritySet(FAULT_SYSTICK, 0xE0);

    Please suggest me if any thing wrong in the above instructions and their interrupt priorities.




    Thanks,
    Regards,
    Srinu.
  • No interrupt handler for the MCU's "Watchdog" is listed.     As poster's (model) code was/is (almost) certainly intended for motor drive - and the "original such code" included a "Watchdog Interrupt" - the "absence" of such "Watchdog Interrupt" demands investigation.

    It would seem "reasonable" that, "Failure to provide a "Watchdog ISR" - when the, "Use of such watchdog is "highly" expected (i.e. for a motor App) would account for the regular (i.e. periodic Reset) of poster's MCU - due to normal/customary,  "Watchdog Reaction to insufficient attention!"     (in this case - NO attention!)

    The "original code" (from which both "Vegas & myself" certainly believe - "poster's code" sprang) definitely enabled the Watchdog - and included a proper Watchdog ISR!

  • Perhaps the RESETCAUSE register contents my indicate the what or who done (reset) my CPU when it was working.
  • Hello sir,


    Can you please suggest me how to write watch dog interrupt in my code according to my interrupt priorities.
    please send me the code for the interrupt.
  • You "gathered" such code from "somewhere" - did you not?
    Is it not likely that the "gathered code" INCLUDED the (necessary) watchdog management?

    It would seem that your (thus far) reported difficulty - is but the "tip" of a (very) tall iceberg - and that (much) further review is necessary!

  • yes i am gathered the code from my senior, and the code belongs to pump application.

    but in that code no any watch dog timers are used, i am taking the same code and add extension sd card and hibernate.
  • Thank you - the lack of such "protective Watchdog" proves (unusual) - and may subject the pump to severe damage.
    As you appear (clear) that, "No watchdog implementation is "in play" - poster BP's suggestion of "Reset Identification" rises atop this thread's heap.

    Is this a NEW application - or is it (just) the addition of "SD Card" and "Hibernate" which yields your issue?

    Did not vendor's Ralph suggest that you limit the code to, "Only one of those additions" so that the "true source of your problem" may be more quickly/easily identified? Have you done such - if so - what were the results?

    The forum Search Box - up top, this page - keyword "Identifying entry w/in Reset ISR" will further clarify the "cause" of System Reset...
  • In previous the code is working fine.


    Now i am adding extra peripherals SD_CARD and Hibernate for data storing purpose.

    Here in previous we are using gsm for sending the data to server, now i want to add sd_card for storing the data along with sending the data to server simultaneously.
    Here when i connect the gsm module, then all are working fine without any reset problem, if i not connect my gsm then my code execution first going to GSM function, and checks the sequence of at command sequence.

    Here i wrote if the first gsm command not accepted (means gsm not connected) like below code

    do
    {
    first++;
    clearbuff();
    tx("AT\r\n");
    SysCtlDelay(SysCtlClockGet() / 12);
    SysCtlDelay(SysCtlClockGet() / 12); //perform the do while untill get responce "OK" from GPRS module
    zxc='1';
    if(first>5)
    {
    return;
    }
    } while((strstr((const char *)m,(const char *)"OK"))==NULL);

    then return to previous instruction in the main function and execute the sd card function in while along with hibernate.

    Here whats the problem i am getting is, it return back to the main function and writing the data to sd_card 5 to 6 times using while loop, then again reset problem occurs.

    This type of problem coming on every 5 to 8 time of data writing in the sd card.

    Here what i am thinking is may be problem with Hibernate.

    Please suggest me whats the problem here.


    Thanks,
    Regards,
    Srinu.
  • My friend - you must "Learn from" and "Practice" KISS - keep your objective (very) small and simple - and proceed (only) one "SMALL Step at a time."

    Instead - you have ADDED (both) SD Card AND Hibernate - it is NOT SURPRISING that such code, "Fails."     (it is a violation of, ONE Small Step at a Time - directed by KISS!)

    There must have been good reason to, "Force the addition" of the complex SD Card.     Why was that added?      Is it not likely that "Problems previously existed" - and that the SD Card was intended to "better understand the problems' cause?"    That's a reasonable assumption - is it not?    Please explain in detail.

    Your attempt to ADD BOTH the SD Card AND Hibernate is (very) likely to FAIL - as it is too large a task - and "usually" proves too hard to get "everything right."     You have been asked to SIMPLIFY - at least for now - so that the SOURCE of your problems may be better recognized.    Kindly delete all references to "Hibernate" - let's see if we can get the Addition of the SD Card - by itself - to work.

    Do give this suggestion a try - and DO tell us - WHY the SD Card was added.     (I am rather certain that EARLIER issues existed - the absence of (any) Watchdog function causes concern - it is doubtful that "all the facts" have been gathered - and placed in evidence...

  • Hello sir,

    From your words, without using hibernate how can i know the data coming on which time (without standing how to do kiss, both standing and giving kiss are required)??
  • My friend - is "your" method - employing BOTH SD Card and Hibernate - getting you anywhere?

    Be not FAST to reject KISS - trying to do EVERYTHING - at ONCE - is not the "best means to proceed."

    I will assist - as best able - but ONLY if you "Comply w/KISS."      Which means - "ONLY ONE (New & limited) Battle at a time."

    Many here have successfully operated an SD Card - WITHOUT ANY USE OF HIBERNATE!        Note that both Vendor's Ralph - and now I - suggest you attempt the same.    (Avoid Hibernate for NOW)    Once that's been SUCCESSFULLY ACHIEVED - only then - we can move on to "hibernate."

    It is noted that you've "Failed to Respond" (at all) to several (important) questions I posed.      If you attempt to "direct the diagnosis" - my efforts/experience (most likely far beyond your own) become dulled - excess time is required - and motivation wanes.     (disappears)      Then - what IS the point?

    Answers AND Compliance - S'il vous plaît...      Allez!

  • Hello sir,


    if i use both on same code i am getting the format like this below.



    Date&Time S V I F KW D


    Tue Dec 12 16:40:07 2017 OFF 000 0.0 00 0000 OFF
    Tue Dec 12 16:40:12 2017 OFF 000 0.0 00 0000 OFF
    Tue Dec 12 16:40:16 2017 OFF 000 0.0 00 0000 OFF
    Tue Dec 12 16:40:21 2017 OFF 000 0.0 00 0000 OFF
    Tue Dec 12 16:40:25 2017 OFF 000 0.0 00 0000 OFF
    Tue Dec 12 16:40:29 2017 OFF 000 0.0 00 0000 OFF

    Above format is working fine in my code but the problem is after writing the data 5 to 8 times, its get reset and again code execution starts from first instruction and writing code in sd_card is continued .
    Please suggest me how to get this format without using hibernate???


    Regards,
    Srinu.
  • Our communication & coordination has failed - badly.
    Twenty posts (now) in - your "Rejection of KISS" and "Failure to provide requested info" - forces my departure.    (other concrete walls beckon...)
    Good luck - surely (others) will "Rush to your aid..."

  • Hello Srinu,

    So the reset problem only occurs after you added the SD card functionality? It never occurred before then? If so, that is where you need to start looking.

    As BP101 suggested, you may want to look at the results from the ResetCause register. There is a TivaWare function to read that which is SysCtlResetCauseGet. Read that after the Reset occurs and store the value.

    Furthermore, if the addition of multiple modules occurs at once and you have an error appear, you should (as cb1 tried suggesting repeatedly) add only one module at a time instead to see which module the error sprung from. Then you can launch a more pointed investigation.

    At this point, there isn't much technical knowledge I can offer as to the 'why' you are seeing this issue. You will need to do more research yourself and if you have further useful finding (such as isolating the peripheral, or getting into from the ResetCause register) then I can provide further feedback about next steps for debug.
  • Hai sir,


    I checked my code as you suggested earlier for SysCtlResetCauseGet like below.

    uint32_t problem;

    problem = SysCtlResetCauseGet();

    at the time of debug my code, i obesrved the variable "problem", but it does not show any value.

    I have a doubt am i check correct or not.Please suggest me if its wrong.



    Regards,
    Srinu.
  • Hello Srinu,

    Can that code block execute after the Reset occurs? Where has it been placed? How are you checking the variable after a reset?

    Note that a power-on reset (POR) will wipe the reset cause, so you need to be sure not to be power cycling the device.
  • Hai sir,

    In debugging process I got the software reset cause. I attached the snap shot. I request you to please find it and suggest me how to resolve the issue.

    Thanks,

    Regards,

    Srinu.

  • Perhaps you should remove the flash boot loader until your reset issue has been resolved. Odds are it has somehow gone bonkers and issued a SW reset command.
  • Following the direction of poster BP and then vendor's Ralph - you've (now) identified the (likely) "source" of your recurring Reset.

    I would think it "advisable" for you to run your "test program" (which resulted in this finding) at minimum 3 or more (additional) times - each time checking - to confirm that "this" really is the "sole" cause of Reset.

    Should this prove the "sole" cause - would not your review of the MCU manual, and then the forum search box - in each case seeking "Software Reset Description/Info" - strengthen "your" knowledge - and capability?

    Your discovery of - and then correction - of such (unwanted) Reset's cause - would prove of interest to many here - thus would be an "ideal means" for you to "complete this thread."
  • Hello sir,

                I am getting the software reset randomly means if i load and debug the code and check by using debugger window (TM4C123G development board) its working fine up to two minutes one time and software reset occurs, again if i run the code then its run upto one minute, three minutes like this randomly software reset occurring.

         I request you to please suggest me how to remove the flash boot loader or any best method to resolve this issue. Please send me the screen shot how to stop the flash boot loader.

    I am using TM4C123G development board for my practice.

    Thanks,

    Regards,

    Srinu.  

  • If application loads to offset 0x0 FBL is not installed..

  • BP101 said:
    Perhaps you should remove the flash boot loader until your reset issue has been resolved.

    This seems like a "reasonable" suggestion - and caused me to page back (thru all 3 forum pages) - in the attempt to discover "IF" the "Flash Boot Loader" was installed.      I could find "NO MENTION" of poster's use of or installation of the "Flash Boot Loader."

    Why did you believe that such, "Flash Boot Loader" was installed & present?

  • Hello sir,


    I am not able to understand why this software reset occurring randomly.


    I am thinking may some thing wrong in my setting of interrupt priorities. Can anybody please check it and suggest me


    IntMasterEnable();

    IntPrioritySet(INT_TIMER0A, 0x00);

    IntPrioritySet(INT_PWM0_0_TM4C123, 0x10);

    IntPrioritySet(INT_PWM0_1_TM4C123, 0x20);

    IntPrioritySet(INT_PWM0_2_TM4C123, 0x30);

    IntPrioritySet(INT_ADC0SS0_TM4C123, 0x40); / /for adc

    IntPrioritySet(INT_TIMER1A, 0x50); // for display in lcd

    IntPrioritySet( INT_HIBERNATE_TM4C123, 0x60); // for hibernate

    IntPrioritySet(FAULT_SYSTICK, 0x70); // fault checking


    Thanks,
    Regards,
    Srinu.
  • cb1_mobile said:
    Why did you believe that such, "Flash Boot Loader" was installed & present?

    Perhaps INT 0x2C presence in application asserts SW reset to load FBL. APP seemingly has function ability to invoke FBL.

  • Reset code user posted invokes (boot.asm) , application startup handler.

    ;* THIS MODULE PERFORMS THE FOLLOWING ACTIONS:
    ;*   1) ALLOCATES THE STACK AND INITIALIZES THE STACK POINTER
    ;*   2) CALLS AUTO-INITIALIZATION ROUTINE
    ;*   3) CALLS THE FUNCTION MAIN TO START THE C++ PROGRAM
    ;*   4) CALLS THE STANDARD EXIT ROUTINE
  • Secondly if the application is hardware bus faulting the exception handler traps into an infinite while loop for code inspection by a debugger. Unless the watchdog timer has been configured to reset the MCU on first timeout driving an NMI exception.

    Perhaps Review register 9 (NMI cause)...
  • BP101 said:
    cb1_mobile
    Why did you believe that such, "Flash Boot Loader" was installed & present?

    Perhaps INT 0x2C presence in application asserts SW reset to load FBL. APP seemingly has function ability to invoke FBL.  

    Admittedly - staff nor I have (yet) to employ, "Flash Boot Loader."

    Yet - your "belief" that "Flash Boot Loader" is installed & "in play" - seems (still) w/out suport or justification...

  • Never said it was in play only to check that it might be. There are only a few things that invoke a SW reset, one of which is asserting INT 0x2C from application to invoke FBL. Another could include Watchdong NMI 1st timeout event. Wonder what would occur if say INTdefaultHandler() were missing in the application or (startup.ccs.c) and an default interrupt source were to fire.
  • Not to rule out the ROM boot loader could some how randomly and incorrectly be issuing SW reset interrupt. Code execution would have to be going bonkers in CPU to illegally access ROM BL address space.
  • Hai sir,

    I request you to please send me a screen shot for how to stop the software rest or CPU halt .


    Thanks,
    Regards,
    Srinu.
  • I loaded my code in to my controller board,powered up and checked my results by using 16x2 LCD. I am not using debugger for watching my results. I just powered up to the controller and run it.Its working fine up to 20 minutes or more and again its starts the execution from main function.

    Please suggest me how to solve this issue. And send me a screen shot to resolve this issue.

    This creates me a problem, if its solved then my project will completed.

    Please help me.

    Thanks,
    Regards,
    Srinu.
  • Srinu Vakada said:
    I request you to please send me a screen shot for how to stop the software rest or CPU halt .

    That is your task. You have to find your problem. We cannot.

    Robert

  • Where is your "senior" - who started this "pump project" - and then "switched it to you?"       Why has he/she "not" come to your aid?      (If he/she cannot - or will not assist - why make such mention?)

    You have been advised - REPEATEDLY - to, "Add the bare minimum, NEW functions" (i.e. just ONE) - then and only then "Re-run your code" - and note the results.        And (always) you resist - and your problem "drags on & on."      (You may not succeed by clinging to "your way" - when it continually FAILS - (as it has for 50 "back/forth" sessions -  is that not so?)

    You have introduced, "Too many variables" into your program - which (of course) makes the "Discovery of the "offender" an "exercise in futility!"

    KISS IS your answer - add to the "Last Working Code" (assumes that has been placed w/in "Quarantine") ONLY ONE SMALL, NEW Element - and then Run.      At some point - via this PROVEN (KISS) "Small, Single Step METHOD" - you are likely to identify, "Where the issue lurks!"       And just then - and only then - we may be able to assist...

    And that's your goal - is it not?      It is "your turn" to "Respond as requested" (i.e. cease directing) and NOT request far lesser, "help aids" - which have (almost) NO chance of succeeding!

  • Please provide a screen shot of how to make KISS work so we can be done with crashing project!

     CB1 advising Kiss is the real deal.  Why not take baby steps verify debug register results and for KISS sake review DATASHEET text.

    You are the chief, not we forum helpers who burned similar midnight oil hours along pothole strewn roads filled from leaky coffee cups.