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.

Project complied but continuous RESET at execution

Hi everybody,

I've noticed the following problem and I hope you can help me understand how I can fix it.

I've added some variables in my project, the project was complied but when I try to execute it, I get a continuous reset. If I delete some of the variables it works again. I assume it has something to do with the memory, but I don't know how/where to check how much memory space I still have for my variables, or which flash blocks I can use, and how to define which variables are stored where and so on. Can somebody clarify or indicate a document that explains this in detail?


Thank you,

Monica

  • Hi Monica,

    Monica Zolog said:
    I assume it has something to do with the memory, but I don't know how/where to check how much memory space I still have for my variables, or which flash blocks I can use, and how to define which variables are stored where and so on. Can somebody clarify or indicate a document that explains this in detail?

    Do check your .map file present in your project folder in workspace. It will give you an idea of the memory utilized; check for the limits.

    Check this link:

    http://processors.wiki.ti.com/index.php/C28x_Compiler_-_Understanding_Linking#Memory_Map_Description

    Regards,

    Gautam

  • Monica,

    are these global or local variables, global goes into the DATA sections and locals go into stack. check your linker command file and increase the size of the sections and see if the error goes away. Also check if you have any arrays and see if code is not writing to the arrays beyond the defined size, if you have any global or local pointers declared, see if you are using them only after proper initialization. 

    Which device is this? The Reset must be happening because of a WDOG overlow which is triggered from an error hanlder. For example on 2806x the ROM iTRAP hanlder would do this, and I believe the default PIE hanlder for iTRAP would do this as well. Check the exception handlers you initlaize and put a break point in them and see if it hits that. Then you will have to inspect the RPC and the stack memory to see which address caused the exception and go from there. But if you can nail down the function/code that's causing the exception by stepping through the code that cuts down the debug time in such cases.

    Hope this helps.

    Best Regards

    Santosh

  • Thank you for your answers guys!

    I've done the followings:

    I've compared the .map files of two projects, one that works and one that gives the reset. I didn't observe any major difference between them, except of course starting addresses and used memory.

    But I've noticed that what causes the reset is the fact that the ADC interrupt is not triggered. In my code I have two interrupts, the ADC and an external interrupt. The watchdog is serviced only if both interrupts were triggered and executed til the end. The flags indicate that the missing interrupt is the ADCINT. The next thing I've noticed is that when I uncomment the line where I calibrate the ADC in the initialization procedure  (AdcOffsetSelfCal(); - this is the function from F2806x_Adc.c without any change), everything works fine, without having to delete any variable.

    For the moment the work around is to delete variables that are needed just for debug purposes, the ADC calibration it's needed for some high precision measurements (there's a big difference in the results without the calibration). But the question is what is actually happening and how could I fix this when new functions and variables will be added in the code?

    Santosh, I didn't really understand your second paragraph regarding ROM iTRAP and so on, I guess I'll need some time to read about this.

    I'm using a control card with TMS320980F28069UPZPS.

    Thanks again,

    Monica