Hello,
I have started using msp430f5324 device for one of my project and i am facing strange behaviour of reset when code crosses certain limits.Even i have put ISR routines to catch the cause.Plz find attached .map files generated .
STACK size : 512 bytes and
compiler : IAR 5.40.3 30 days Evaluation version
Optimization : None
memory model : small
The behaviour corresponds to map file ( File_1 with reset problem) :
· The device gets reset ( power on and off automatically).
· Suspecting software reset(NMI).
· I tried to catch it with SYSNMI and UNMI ISRs. But not able to catch.
· Even I experimented with STACK size : 1024 bytes.
The behaviour corresponds to map file ( File_2 without reset problem) :
· I have commented few functions which are straight forward and those functions don’t deal with device Hardware registers too.
· The device is found to be working normally.
· Even keeping those function working, if I comment some other functions then too the device works.
7142.File_1_With Reset Problem.txt
0042.File_2Without Problem.txt
what could be wrong ? what would be the debugging & precaution points.Your valuable comments will be helpful.
Thanks & regards,
Ars
Hi Ars,
I noticed that your code size is ~44kb, which means you need to use the 20-bit CPUX extensions to access the additional flash. Try setting the "data model" and "code model" to "large".
Tony
I have selected the option data model to “large” .But didn’t find anything called “code model’ selection. But problem remains same.
Hello Ars,
Two separate questions for you.
Do you have any assembly language in your project?
Can you have the compiler generate a listing with assembly mnemonics included for one of your source code files. Like this:
Project Options -> C/C++ Compiler -> List -> Output List File (Yes) -> Assembler mnemonics (Yes)
Review the listing file (*.lst) generated by the compiler and see if function calls are made with "CALLA" or "CALL" and see if functions end with "RETA" or "RET". If you have the project configured correctly, you will see CALLA / RETA.
Jeff
Hello jeff,
thanks for suggestions.I have done this.And functions are being called thru' "CALLA" and end with "RETA"
And i don't have any assembly file include in my project.
thanks
After you have changed the data model and recompiled, does it still say this in the linker map?
__data_model = small
Also, try enabling "20-bit context save on interrupt" in Compiler->Code.
Hi again Ars,
A few more ideas for you: