Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Stack allocation and size

Status
Not open for further replies.
I am trying to build a project using mplabx for micro chip ddpic33ev family. But i am not sure of where to give stack size and starting location. There is a coloumn for minimum stack size. Should i give there? I am finding an softrap reset that is 0x40 in rcon register. I am really trying to figure out how to resolve, but not able to solve it. After flashing it works for 6 seconds and resets. Any call trace feature available in mplabx? Please advice.
 
Why do you assume its a stack issue... The stack will be large enough for any program you send it..

It seems to me to be a watchdog problem The watchdog is denoted by 0x04 of the Rcon... 0x40 isn't a valid error..
 
upload_2017-8-10_23-38-9.png


The Bit 14 was set 0x4000. Do not know what to do? Can you suggest some methods to solve. The micro chip family is dspic33ev256gm106.
 

Attachments

  • upload_2017-8-10_23-37-6.png
    upload_2017-8-10_23-37-6.png
    8.1 KB · Views: 204
If you are using C, then these issues should not be a problem.... Uninitialized W reg flag or an unrecognised instruction will not ever be a problem in C unless you are selecting the wrong device.... If you compile for a slightly different chip than the one you are simulating, then this will happen..

It would take some rubbish programming to use up the entire stack... I have also noticed that some of the new micro learners cannot distinguish between a hardware stack and a software stack!!! You need to read up!!
 
No it may not be because of stack i thought about it once. Could you please tell me how to find out the actual reason. I want to see the call trace but mplabx does not seem to support. What are the methods i can use? Please help. If it is different chip how to find out?
 
I found that Dead Man Timer to be disabled. When i did it is not resetting. What exactly is this? I never heard about it.
 
I found that Dead Man Timer to be disabled. When i did it is not resetting. What exactly is this? I never heard about it.
Its just another name for Watchdog timer.... The watchdog timer is smaller, the deadman can be programmed to larger delays!!
 
One of the really sad thing is that none of the register told me it is Dead Time reset. I have spent huge effort resolving it and that too purely out of luck.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top